On Wed, Apr 30, 2008 at 10:05 AM, Guido van Rossum <[EMAIL PROTECTED]> wrote:
..
>  >
>  >  What would you say to an idea of exposing rangeiter in itertools - say
>  >  itertools.irange(..) function that returns an iterator?
>
>  You're kidding right? If you *want* the iterator, what's wrong with
>  iter(range(N))? It's even less characters than itertools.irange(N).
>  :-)

No, I was not kidding (but I may be acting as a performance freak:-).

Since you cannot reuse the result of iter(range(N)), using explicit
iter call over implicit does not save much.  I would be happy with
itertool.count(..) getting an optional stop argument instead of adding
irange().
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to