A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2002-July/026827.html below:

[Python-Dev] The iterator story

[Python-Dev] The iterator story [Python-Dev] The iterator storyNeal Norwitz neal@metaslash.com
Fri, 19 Jul 2002 18:32:09 -0400
Neil Schemenauer wrote:
> 
> Ka-Ping Yee wrote:
> >     I think "for" should be non-destructive because that's the way
> >     it has almost always behaved, and that's the way it behaves in
> >     any other language [@] i can think of.
> 
> I agree that it can be surprising to have "for" destory the object it's
> looping over.  I myself was bitten once by it.  I'm not yet sure if this
> is something that will repeatedly bite.  I suspect it might. :-(

In what context?  Were you iterating over a file or something else?
I'm wondering if this is a problem, perhaps pychecker could generate
a warning?

Neal




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4