2016-02-09 10:57 GMT+01:00 Joseph Martinot-Lagarde <contreba...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com