[Python-Dev] Terminology of "Iterable" and "Iterator"

Nick Coghlan ncoghlan at gmail.com
Wed Jul 25 15:26:59 CEST 2007


Calvin Spealman wrote:
> This might indicate that it is using "collection" where I would say
> "iterable". Also, the same docstring makes mention of something being
> an iterator _or_ a sequence, so I also should bring up that it may be
> antiquated, yes?

http://docs.python.org/dev/lib/typeiter.html

That page describes the same two categories you do, but doesn't actually 
use the word 'iterable' for the first category (i.e. anything with an 
__iter__ method).

So, yes, I think updating the docs to use the common terminology for 
both categories would be a good thing.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org


More information about the Python-Dev mailing list