PEP 276 -- What else could iter(5) mean?
eppstein at ics.uci.edu
Sun Mar 3 02:47:00 CET 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