Different byte-code in same major version (2.6.x)?

Aahz aahz at pythoncraft.com
Fri Jun 18 00:21:34 EDT 2010


In article <7xfx0ot9ul.fsf at ruckus.brouhaha.com>,
Paul Rubin  <no.email at nospam.invalid> wrote:
>Hartmut Goebel <h.goebel at crazy-compilers.com> writes:
>>
>> I'm facing a curious problem: 2.6, 2.6.1 and 2.6.4 are generating
>> different byte-code for the same source. I can not find the reason for.
>
>Why should they generate the same bytecode?  All that you should expect
>is that the same bytecode should be runnable on all three interpreters.

...and produce the same result, modulo any bugfixes.

>It is ok if a newer version of the compiler does additional
>optimizations or that sort of thing, resulting in different bytecode.
>It's just like with any compiler.

This seems to be a corner-case of PEP6.  I think that if anyone had
specifically asked about this, I likely would have added bytecode
generation to the list of prohibitions, but there's probably little
impetus to add this prohibition to PEP6 now.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"If you don't know what your program is supposed to do, you'd better not
start writing it."  --Dijkstra



More information about the Python-list mailing list