Ethan Furman added the comment: 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 ---------- nosy: +ethan.furman _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue24327> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com