[Python-Dev] Single- vs. Multi-pass iterability

Delaney, Timothy tdelaney@avaya.com
Mon, 15 Jul 2002 08:51:36 +1000


> From: Delaney, Timothy [mailto:tdelaney@avaya.com]
> 
> if iter(x) == iter(x):
>     # this is *definitely* a single-pass iterable

Of course, that should have been

if iter(x) is iter(x):
     # this is *definitely* a single-pass iterable

Too much damned Java at the moment :(

Tim Delaney