"Oren Tirosh" <[EMAIL PROTECTED]> wrote in message 
news:[EMAIL PROTECTED]
> But when iter() returns the same object - well, that's a
> sign that the object is definitely not reiterable.

Unless, of course, __iter__ resets the iteration variable to its starting 
value.  But it would definitely not be simultaneously doubly iterable, as 
one would want to compute a self crossproduct.  And one could object that 
such an __iter__ is not proper for an iterator (return self and do nothing 
else).  So such an __iter__ should better be written, perhap as a generator 
function, to return an independent object with independently initialized 
iteration variable.

Terry J. Reedy



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

Reply via email to