[Python-Dev] Inconsistent behaviour in import/zipimport hooks

Guido van Rossum guido at python.org
Thu Nov 10 02:01:57 CET 2005

> > I like Phillip's suggestion -- no new opcode, just a conditional jump
> > that can be easily optimized out.
> Huh?  But Phillip is suggesting a new opcode that is essentially the
> same as my proposal but naming it differently and saying the bytecode
> should get changed directly instead of having the eval loop handle the
> semantic differences based on whether -O is being used.

Sorry. Looking back they look pretty much the same to me. Somehow I
glanced over Phillip's code and thought he was proposing to use a
regular JUMP_IF opcode with the special __debug__ variable (which
would be a 3rd possibility, good if we had backwards compatibility
requirements for bytecode -- which we don't, fortunately :-).

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list