Python bytecode compatibility between interpreter versions
skip at pobox.com
Sun Mar 21 17:06:55 CET 2004
>> The fundamental difference between Java and Python in this regard is
>> that the JVM must absolutely be part of the defined API since it is
>> delivered separate from the compiler.
Jon> Absolutely untrue. The JVM is part of the Java /spec/, but has
Jon> nothing to do with the /API/ (e.g. Java 2 Standard Edition) that
Jon> application programmers use.
Sorry, terminology flub. Spec, external interface, API... What I meant was
that the Java folks obligated themselves to keep it compatible. There are
no such claims for the Python VM.
>> Whoever does this stuff probably has to go to great lengths to
>> preserve compatibility. This is not the case for the Python VM,
>> since a new version is delivered with each distribution.
Jon> I don't get what you're trying to say here. The JVM has changed
Jon> very little (or not at all) over the different Java versions.
The Python VM changes frequently, certainly when compared to the Java VM.
The PVM is an implementation detail. Your experience with Batik could not
in general be replicated with a tar file full of Python bytecode, and I'm
not sure I'd want it to be.
Jon> The only reason I can think of for wanting CPython's VM to remain
Jon> undocumented / not-nailed-down is because we want to make it easier
Jon> / give more freedom to the language designers to implement the
Jon> plumbing for new Python features.
More information about the Python-list