Alex Martelli wrote:
> Georg Brandl <[EMAIL PROTECTED]> wrote:
> 
>> Slight terminology glitch -- it does return an iterator, not a
>> generator. Generators are functions that return iterators.
> 
> xrange returns an ITERABLE, not an ITERATOR.  Videat:
> 
>>>> a = xrange(23, 43)
>>>> a.next()
> Traceback (most recent call last):
>   File "<stdin>", line 1, in ?
> AttributeError: 'xrange' object has no attribute 'next'
>>>> 
> 
> No next method -> not an iterator.  iter(xrange(...)) DOES return an
> iterator, btw.

Thanks! Somehow it's always these little corrections that contain errors.

And, considering your other posts today, I got away quite well...

Georg
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to