Python bytecode compatibility between interpreter versions

Skip Montanaro skip at pobox.com
Sun Mar 21 10:06:17 EST 2004


    >> pyc files are a behind the scenes implementation detail of one
    >> version of the Python interpreter that are automatically generated
    >> and maintained.

    Jon> Huh??  .pyc files are an "implementation detail of the Python
    Jon> interpreter"?  Care to expound further?  'Coz that sounds pretty
    Jon> nonsensical...

As I mentioned in my previous post, the distiction between the Java VM and
the Python VM is that the former is delivered separate from the compiler and
other tools, while the latter is delivered afresh with each Python
distribution.  Guido would be free to eliminate the Python VM from the next
version of Python and instead directly interpret the abstract syntax tree
emitted by the compiler.  PyChecker and other tools which operate directly
with the bytecode would break, but Python applications should still work.

Think of it this way.  The Java virtual machine architecture is sort of akin
to the current Wintel architecture.  The Python virtual machine architecture
would like Microsoft shipping a new, possibly incompatible, CPU with each
copy of Windows.

Skip




More information about the Python-list mailing list