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 quiver
Recipients
Date 2004-02-02.11:47:33
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=671362

I am not sure if I should call this a bug, but here it goes:

>>> lst = [lambda x:x+y for y in range(3)]
>>> for f in lst:print f(0)
...
2
2
2
>>> gen = (lambda x:x+y for y in range(3))
>>> for f in gen:print f(0)
...
0
1
2

Is this the intended behavior?
History
Date User Action Args
2007-08-23 15:31:37adminlinkissue872326 messages
2007-08-23 15:31:37admincreate