[Python-Dev] Re: Proposed iterator representations

David Eppstein eppstein at ics.uci.edu
Fri Apr 9 16:43:29 EDT 2004


In article <012001c41e63$5799a860$e435c797 at oemcomputer>,
 "Raymond Hettinger" <python at rcn.com> wrote:

> > Does
> > 
> > it=count(20); it.next(), it.next(); it
> > 
> > still print 'count(20)' as it one was but no longer is?
> 
> That prints "count(22)".

Speaking of itertools.count, where can I find the rationale for the 
"Does not currently support python long integers." restriction?

This bit me the last time I needed count (part of an implementation of 
the greedy algorithm for Egyptian fractions, so I really needed longs) 
and I ended up having to roll my own.  Not that it was especially 
difficult to roll my own, but it seems like it would have been harder to 
put that check in than to just allow longs to work and I don't 
understand why it was done that way.

I tried googling the python-dev archives but no luck.

-- 
David Eppstein                      http://www.ics.uci.edu/~eppstein/
Univ. of California, Irvine, School of Information & Computer Science




More information about the Python-Dev mailing list