Python bytecode compatibility between interpreter versions

Skip Montanaro skip at pobox.com
Sun Mar 21 12:06:05 EST 2004


    >> 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.

    Jon> eh...?  If interpreting the AST isn't what the CPython VM does,
    Jon> then what does it do?

It interprets the Python bytecodes.

    >> PyChecker and other tools which operate directly with the bytecode
    >> would break, but Python applications should still work.

    Jon> Does this mean that you will need a different version of PyChecker
    Jon> for each Python .x release?

Not necessarily.  It doesn't know everything there is to know about Python
bytecode, but it does know some bytecodes and rummages around in code
objects a bit, so if there was no bytecode it would have nothing to rummage
through.

Skip




More information about the Python-list mailing list