Pre-PEP: reverse iteration methods
David Eppstein
eppstein at ics.uci.edu
Thu Sep 25 01:13:07 EDT 2003
In article <mailman.1064453195.20358.python-list at python.org>,
Lulu of the Lotus-Eaters <mertz at gnosis.cx> wrote:
> David Eppstein <eppstein at ics.uci.edu> wrote previously:
> |It would be quite cumbersome to have to identify simple generators as
> |infinite or finite manually, and impossible (halting problem) to do so
> |reliably automatically.
>
> Humans cannot solve the halting problem either, FWIW. Just because a
> programmer THINKS an iterator is finite, it don't mean it is!
Well, true, but if you are a programmer and don't know whether your
program is always going to halt, you probably shouldn't have written it
that way.
--
David Eppstein http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science
More information about the Python-list
mailing list