[Python-Dev] The iterator story (Single- vs. Multi-pass iterability?)
Gerald S. Williams
gsw@agere.com
Fri, 19 Jul 2002 15:41:09 -0400
I started to type this before looking back at the other
threads, so feel free to ignore it if it's entirely
superfluous. I'm sorry that I didn't have time to follow
the "Single- vs. Multi-pass iterability" thread. Code
freeze is today. :-)
I'm a little confused about this destructive-for/iterator
issue.
Sure an iterator that destroys the original object might
be unexpected, but wouldn't you expect a non-destructive
iterator to be the default for any object unless there's
a pretty good reason to use a destructive one? If there's
a chance that the object may be destroyed/altered (such
as a file stream or an iterator), shouldn't you already
have some reason to suspect that?
-Jerry
Strong typing is for weak minds. Weak typing is for the
real troublemakers. ;-)
P.S. Leaving off the original subject line can be mildly
annoying to those of us subscribing to the digest
version of the list. Probably more so to those who
read our responses. :-)