The Differences Between IronPython and CPython

IronPython is an implementation of the Python programming language written in C#, running on the Microsoft .NET framework and Mono.

This naturally means that there are some differences between IronPython and CPython. The most significant differences being:
  • IronPython uses the underlying .NET basic types. Strings are therefore Unicode by default, as they will be in Python 3.
  • IronPython compiles Python code to .NET assemblies, and uses neither Python stack frames nor bytecode.
  • CPython extensions written in C, using the CPython C API, don't work with IronPython (at least not until Ironclad is completed).
There are several lesser differences as well. For example, did you know that CPython catches string exceptions by reference whereas IronPython catches them by value?

The IronPython team have written up the differences between the two implementations and have now put them up on wiki pages:

Comments

Popular posts from this blog

Extending Abobe Flash Player and AIR with Python and Ruby

Should Python Projects Support IronPython and Jython?

Further Adventures of the Debugger