We can already easily simulate your first alternative in a generator comprehension:
(x for it in its for x in it) # equivalent to def gen(its): for it in its: for x in it: yield x so anyone who wants that behaviour can easily get it. So unpacking in a comprehension should provide the second alternative: (*it for it in its) # equivalent to def gen(its): for it in its: yield from it As you say, the difference is subtle, and usually not important, so most people will not care and will use whatever is easier to type :-) (I think the difference has to do with sending values into the generator, throwing and catching exceptions, but I can't think of a simple example where it would make a difference.) -- Steve _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/T6EGYWBFUGQ3C4ZIFAZY6GDG5IKTXE26/ Code of Conduct: http://python.org/psf/codeofconduct/