This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jpe
Recipients
Date 2005-03-21.17:47:59
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
The following raises an unexpected exception; I would
expect it to either work or raise a SyntaxError.  It
seems that the grammar parses it, but the compiler does
not do the right thing.

>>> def foo(a): pass

>>> foo(a = i for i in range(10))

Traceback (most recent call last):
  File "<stdin>", line 1, in ?
NameError: name 'i' is not defined

foo(a = (i for i in range(10)) works.
History
Date User Action Args
2007-08-23 14:30:27adminlinkissue1167751 messages
2007-08-23 14:30:27admincreate