[issue7364] Traceback contains incorrect line number for duplicate argument in lambda definition

2009-11-19 Thread James Lingard
New submission from James Lingard : The following python file: lambda a, a: 0 when executed gives the following backtrace: File "/tmp/test.py", line 0 SyntaxError: duplicate argument 'a' in function definition Note that the line number is 0, not 1. (It's al

[issue7362] Incorrect error message with def((x)=0)

2009-11-19 Thread James Lingard
New submission from James Lingard : def f((x)=0): pass gives the following incorrect error message: SyntaxError: non-default argument follows default argument "def f((x)): pass" is treated exactly the same as "def f(x): pass", so it would seem sensible for the same to