[Python-3000] range() issues
Guido van Rossum
guido at python.org
Wed Apr 30 16:05:20 CEST 2008
On Tue, Apr 29, 2008 at 8:22 PM, Alexander Belopolsky
<alexander.belopolsky at gmail.com> wrote:
> On Tue, Apr 29, 2008 at 10:36 PM, Guido van Rossum <guido at python.org> wrote:
> ..
> > There are good reasons for having range() return an Iterable and not
> > an Iterator;
>
> 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).
:-)
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-3000
mailing list