PEP 276 -- What else could iter(5) mean?
David Eppstein
eppstein at ics.uci.edu
Sat Mar 2 20:47:00 EST 2002
Here's another way of looking at the same question.
An iterable object has a next() function, that's what it means to be
iterable. If numbers are iterable, we can call number.next(), right?
So what should 5.next() be? Surely anyone familiar with the Peano axioms
would say 6, not 0!
--
David Eppstein UC Irvine Dept. of Information & Computer Science
eppstein at ics.uci.edu http://www.ics.uci.edu/~eppstein/
More information about the Python-list
mailing list