How do you refer to an iterator in docs?

Steven D'Aprano steve+comp.lang.python at pearwood.info
Sat Apr 21 04:10:34 EDT 2012


On Fri, 20 Apr 2012 23:01:08 -0400, Roy Smith wrote:

> A basket of apples is a basket which contains apples, in the same way a
> list contains foos.  But an iterator doesn't contain anything.  You
> wouldn't say, "a spigot of water", because the spigot isn't a container
> holding the water.  It is simply a mechanism for delivering the water in
> a controlled way.


A better analogy would be a trickle, stream or torrent of water.

In English, "a foo of bar" does not necessarily imply containment, e.g. a 
circle of friends, a conspiracy of silence, a flood of refugees, a tissue 
of lies.


-- 
Steven



More information about the Python-list mailing list