PEP 289: universal and existential operators

Robert Brewer fumanchu at amor.org
Fri Nov 7 14:31:46 EST 2003


> I think we need a companion module to itertools.  The functions 
> in itertools *produce* useful iterators; we need a module for 
> functions that usefully *consume* iterators.  Yes, a few, in each 
> case, judged more useful than others, are built-ins (iter, 
> enumerate, reversed as producers; sum, min, and max as consumers). 
> But, most others won't be -- so we have itertools and need [good 
> name for "iterator consumers" sought -- accumulators?).

Given the short list of functions I've seen ("sum", "min", "average",
etc.) the choice of a name for the consumers might be "aggregators",
with which anyone who has done SQL work would be familiar. If only the
spelling weren't so eggregggious.

Barring that choice, how about just "consumers"?


Robert Brewer
MIS
Amor Ministries
fumanchu at amor.org





More information about the Python-list mailing list