[issue26204] compiler: ignore constants used as statements (don't emit LOAD_CONST+POP_TOP)

Jim Jewett report at bugs.python.org
Tue Feb 9 17:38:05 EST 2016


Jim Jewett added the comment:

I think the warning was helpful; it just had confusing wording.

Instead of: """
>>> def f():
...  False
...
<stdin>:2: SyntaxWarning: ignore constant statement
"""

perhaps: """
>>> def f():
...  False
...
<stdin>:2: SyntaxWarning: ignoring constant statement
"""

or even: """
>>> def f():
...  False
...
<stdin>:2: SyntaxWarning: ignoring unused constant 'False'
"""

----------
nosy: +Jim.Jewett

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26204>
_______________________________________


More information about the Python-bugs-list mailing list