Message113621
+1 on the basic idea to make error messages more informative where possible, but am not sure how it would work in any but the more simple cases.
How would work in cases where there are multiple possible "expected" tokens?
>>> def f(x 3):
SyntaxError: invalid syntax
It chokes at the "3". The expected token is either a comma, colon, or closing parenthesis.
Also, the most annoying and least obvious syntax errors are ones that are revealed many characters away from the original cause (i.e. unbalanced opening brackets or parentheses). Am not sure how you can readily construct a helpful message in these cases. |
|
Date |
User |
Action |
Args |
2010-08-11 19:51:44 | rhettinger | set | recipients:
+ rhettinger, sean_gillespie, ajaksu2, oliver_gramberg, benjamin.peterson, dmalcolm |
2010-08-11 19:51:44 | rhettinger | set | messageid: <1281556304.07.0.132946034432.issue1634034@psf.upfronthosting.co.za> |
2010-08-11 19:51:41 | rhettinger | link | issue1634034 messages |
2010-08-11 19:51:40 | rhettinger | create | |
|