On 14 июл, 23:36, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > On 13 juil, 12:05, Yosifov Pavel <[EMAIL PROTECTED]> wrote: > (snip) > > > defcloneiter( it ): > > """return (clonable,clone)""" > > return tee(it) > > This might as well be written as > > cloneiter = tee > > Or yet better, just remove the above code and s/cloneiter/tee/g in the > remaining...
Yes, sure. It was only for illustration. BUT: Marc Rintsch is right: cloning of iterators in this manner is bad, more good is to use one, single list(my_iter) instead of (see http://aquagnu.blogspot.com/2008/07/self-repair-iterator-in-python.html). Thanks to all! --pavel -- http://mail.python.org/mailman/listinfo/python-list