Some time ago I read a text or saw a video on iterators and one thing I remember from it, is that you should do something like the following when working with iterators, to avoid some pitt falls.
def bar(iterator):
if iter(iterator) is iterator:
...
However I can't relocate it and can't remember the what and how anymore.
Does anyone know what this is about?
--
Antoon.
--
https://mail.python.org/mailman/listinfo/python-list
