[issue8379] if __debug__: has nonobvious behaviour when evaluating .pyo without -O
Timothy Fitz
report at bugs.python.org
Thu Apr 15 03:03:24 CEST 2010
Timothy Fitz <timothyfitz at gmail.com> added the comment:
Does that mean you agree that the behavior is a bug?
If we're agreed that the behavior is a bug, then it's just a matter of solving the implementation details. One suggestion is to compile in a __debug__ check at the top of every .pyo file, effectively prepending every file with "if __debug__ == True: raise AssertionError()". Another could be to add a header to the bytecode (clearly waiting for the next major release of Python).
We'll gladly contribute patches once a suitable implementation has been chosen.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8379>
_______________________________________
More information about the Python-bugs-list
mailing list