[issue22091] __debug__ in compile(optimize=1)
SilentGhost
report at bugs.python.org
Sun Jul 27 13:43:17 CEST 2014
SilentGhost added the comment:
I can reproduce your example on 3.4, but for the comparison:
>>> exec(compile("if __debug__: print(42)", "exec", "exec", optimize=1))
>>> exec(compile("if __debug__: print(42)", "exec", "exec", optimize=0))
42
So, it's not as straightforward as one might imagine.
----------
components: +Interpreter Core
nosy: +SilentGhost
versions: +Python 3.4, Python 3.5
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22091>
_______________________________________
More information about the Python-bugs-list
mailing list