newbie question

Diez B. Roggisch deetsNOSPAM at
Sun Dec 19 16:48:27 CET 2004

> It works as if you had written:
> for _i in xrange(len(myList)):
> x = myList(_i)

No, as this implies that the variable has to support random access using
indices. But all that's required is the iterable-interface beeing supported
- by calling __iter__ and .next() on the resulting object.


Diez B. Roggisch

More information about the Python-list mailing list