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 ethan.furman
Recipients Mital Ashok, ethan.furman
Date 2015-05-29.18:32:49
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1432924369.16.0.758957293027.issue24327@psf.upfronthosting.co.za>
In-reply-to
Content
Do you mean something like:

--> def heh():
...   yield [1, 2, 3]
... 
--> for i in heh():
...   print(i)
... 
[1, 2, 3]
# *grumble*
--> def heh():
...   for i in [1, 2, 3]:
...     yield i
... 
--> for i in heh():
...   print(i)
... 
1
2
3


If so, use `yield from`:

--> def huh():
...   yield from [1, 2, 3]
... 
--> for i in huh():
...   print(i)
... 
1
2
3
History
Date User Action Args
2015-05-29 18:32:49ethan.furmansetrecipients: + ethan.furman, Mital Ashok
2015-05-29 18:32:49ethan.furmansetmessageid: <1432924369.16.0.758957293027.issue24327@psf.upfronthosting.co.za>
2015-05-29 18:32:49ethan.furmanlinkissue24327 messages
2015-05-29 18:32:49ethan.furmancreate