[Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension
Greg Ewing
greg.ewing at canterbury.ac.nz
Mon Oct 17 19:17:12 EDT 2016
More information about the Python-ideas mailing list
Mon Oct 17 19:17:12 EDT 2016
- Previous message (by thread): [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension
- Next message (by thread): [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
David Mertz wrote: > >>> 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). It won't blow up, because * in a generator expression would be equivalent to yield-from. -- Greg
- Previous message (by thread): [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension
- Next message (by thread): [Python-ideas] Fwd: Fwd: Fwd: unpacking generalisations for list comprehension
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-ideas mailing list