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 <rep...@bugs.python.org>
<http://bugs.python.org/issue22091>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to