[issue37500] 3.8.0b2 no longer optimizes away "if 0:" ?

Pablo Galindo Salgado report at bugs.python.org
Fri Jul 5 18:02:11 EDT 2019


Pablo Galindo Salgado <pablogsal at gmail.com> added the comment:

> I see optimizing away 'if __debug__: ...' clauses, when __debug__ is False (and 0) as currently documented language behavior, not a 'deep implementation detail'.
https://docs.python.org/3/reference/simple_stmts.html#the-assert-statement

I don't think you can conclude that is documented with this argument. What's documented is what happens with the assert statement, not with arbitrary dead code. The link between the two is at least an interpretation, not an explicitly documented think.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37500>
_______________________________________


More information about the Python-bugs-list mailing list