Pre-PEP: reverse iteration methods
David Eppstein
eppstein at ics.uci.edu
Wed Sep 24 20:11:01 EDT 2003
> > # let inifinite iterators identify themselves
> > assert not hasattr(obj, 'infinite')
> >
> >As infinite iterators are rare, it would not be too cumbersome to let them
> >identify themselves as such.
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.
--
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