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

Georg Brandl g.brandl at gmx.net
Wed Jul 25 18:52:43 CEST 2007


Raymond Hettinger schrieb:
> The docs do make a distinction and generally follow the definitions given in
> the glossary for the tuturial.
> 
> In the case of iter(collection), I prefer the current wording because the
> target object need not support __iter__, it is sufficient to supply a
> sequential __getitem__ method.

But as "collection" is never used in that meaning anywhere else, it could
as well be iter(object).

bike-shed-ly yrs,
Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list