[issue21669] Custom error messages when print & exec are used as statements
Guido van Rossum
report at bugs.python.org
Fri Jun 6 18:29:11 CEST 2014
Guido van Rossum added the comment:
Nice! I put it through a bit of a torture test and found a few odd corners. E.g. it doesn't catch this:
if 1: print 42
nor this:
if 1:
print 42
nor this:
def foo():
print 42
I also notice that if the printed expression starts with a unary + or -, it is not a syntax error but a type error. But I don't think we should try to do anything about that.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21669>
_______________________________________
More information about the Python-bugs-list
mailing list