[Python-ideas] Generators are iterators

Ethan Furman ethan at stoneleaf.us
Sat Dec 13 02:32:31 CET 2014


On 12/12/2014 05:22 PM, Andrew Barnert wrote:
> On Dec 12, 2014, at 16:40, Chris Barker wrote:
>> 
>> this issue here is that inteh PEP, and in this list, it seems "iterator" was used to describe classes with __init__
>> and __next__ methods, AS APPOSED to the things returned from functions with a yield in them...
> 
> But the thing returned by a function without yield in it is an instance of the built-in class generator, which is a
> subtype of Iterator.

Um, what?

--
~Ethan~

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20141212/8698ea52/attachment.sig>


More information about the Python-ideas mailing list