[Python-Dev] PEP 479: Change StopIteration handling inside generators
Ron Adam
ron3200 at gmail.com
Sat Nov 22 22:07:53 CET 2014
On 11/22/2014 03:01 PM, Terry Reedy wrote:
>
>> Then both a comprehension and a generator expressions can be viewed as
>> defining iterators,
>
> A comprehension is not an iterator. The above would make a list or set
> comprehension the same as feeding a genexp to list() or set().
Correct, but we could think and reason about them in the same way.
Cheers,
Ron
More information about the Python-Dev
mailing list