On Mon, Oct 17, 2016 at 9:49 PM David Mertz <me...@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) > 0 > >>> next(comp) > 1 > > 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. Elazar
_______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/