Steven D'Aprano wrote:
> On Wed, 05 Apr 2006 16:21:02 +0200, Georg Brandl wrote:
> 
>> Because of backwards compatibility. range() returns a list, xrange() an
>> iterator: list(xrange(...)) will give the same results as range(...).
> 
> Georg is pretty much correct in his explanation, but just to dot all the
> I's and cross all the T's, we should explain that xrange() doesn't return
> an iterator, it returns a special xrange object:

Ah yes, the old iterator <-> iterable problem ;)

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

Reply via email to