itertools to iter transition (WAS: Pre-PEP: Dictionary accumulator methods)
David Eppstein
eppstein at ics.uci.edu
Mon Mar 28 19:07:46 EST 2005
In article <mailman.967.1112032612.1799.python-list at python.org>,
Jack Diederich <jack at performancedrivers.com> wrote:
> I only included making iter a type to make it more symmetric with str
> being a type. iter is currently a function, as a practical matter I wouldn't
> mind if it doubled as a namespace but that might make others flinch.
iter having the attributes currently residing as methods in itertools
sounds just fine to me.
I really don't like iter as a type instead of a function, though. It
sounds like a cool idea at first glance, but then you think about it and
realize that (unlike what happens with any class name) iter(x) is almost
never going to return an object of that type.
--
David Eppstein
Computer Science Dept., Univ. of California, Irvine
http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list