A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-February/143212.html below:

[Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement

[Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statement [Python-Dev] Issue #26204: compiler now emits a SyntaxWarning on constant statementVictor Stinner victor.stinner at gmail.com
Tue Feb 9 05:06:43 EST 2016
2016-02-09 10:57 GMT+01:00 Joseph Martinot-Lagarde <contrebasse at gmail.com>:
> I frequently use 1/0 as a quick break in a script or a program (it's even
> more useful with post-mortem debugging). Would it be considered as a
> constant and ignored instead of raising a ZeroDivisionError ?

"self.x - self.y" and "1/0" are not removed since they have side effects.

Right now, "(1, 2, 3)" is not removed. But later we may remove it,
since it has no side effect, it's a constant statement.

Note: We are talking about statements. 1 is not removed in "lambda: 1"
which is a valid expression ;-)

Victor
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4