[issue2238] TypeError instead of SyntaxError for syntactically invalid gen exp

2008-03-20 Thread Sean Reifschneider
Sean Reifschneider [EMAIL PROTECTED] added the comment: Back-ported to 2.5 and committed in rev 61675. -- nosy: +jafo priority: - normal status: pending - closed __ Tracker [EMAIL PROTECTED] http://bugs.python.org/issue2238

[issue2238] TypeError instead of SyntaxError for syntactically invalid gen exp

2008-03-04 Thread Nathan Collins
New submission from Nathan Collins: I have a file f1.py $ cat f1.py import os (lambda **x:x)(**dict(y,y for y in ())) and when I run it $ python f1.py Traceback (most recent call last): File f1.py, line 1, in module import os TypeError: 'int' object is not iterable Notice that the

[issue2238] TypeError instead of SyntaxError for syntactically invalid gen exp

2008-03-04 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Interestingly, in debug mode, the message XXX undetected error is printed to stderr. And this gives the solution: in ast.c, some calls did not check the return status. Committed revision 61240, will backport to 2.5. Thanks for the report! Thanks for the