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

Tim Peters report at bugs.python.org
Fri Jul 5 18:37:19 EDT 2019


Tim Peters <tim at python.org> added the comment:

> This is the expected result of fixing a bug that has been
> open since 2008

It's the expected result of fixing a bug _by_ eliminating the optimization entirely.  It's not an expected result of merely fixing the bug.  It's quite obviously _possible_ to note that

if 0:
    return

is forbidden at module level, yet not emit any bytecode for it.  Indeed, it's so obvious that everyone here did it in their head without even noticing they had done so ;-)

----------
nosy: +tim.peters

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


More information about the Python-bugs-list mailing list