[issue19080] Enrich SyntaxError with additional information

Terry J. Reedy report at bugs.python.org
Sat Sep 28 23:11:39 CEST 2013


Terry J. Reedy added the comment:

Currently,
>>> * 2 # or * a
SyntaxError: can use starred expression only as assignment target
This conflicts with your desired message. It cannot change because *a, at least, is a valid statement prefix in a way that '/ a' is not.

Most other things give an uninformative generic 'invalid syntax' message (plus a more informative location indicator). If you can find a way to improve this, lots of people would be happy ;-).

----------
nosy: +terry.reedy
versions: +Python 3.4

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


More information about the Python-bugs-list mailing list