On Mon, Oct 17, 2016 at 9:49 PM David Mertz <mertz@gnosis.cx> wrote:
Moreover, this "magical flatten" operator will crash in bad ways that a regular flatten() will not.  I.e. this is fine (if strange):

>>> three_inf = (count(), count(), count())
>>> comp = (x for x in flatten(three_inf))
>>> next(comp)
>>> next(comp)

It's hard to see how that won't blow up under the new syntax (i.e. generally for all infinite sequences).

The proposed semantics replace the asterisk with a "yield from" in a generator, so it should work just fine.