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


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to