This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients aaron315, brian.curtin, giampaolo.rodola, neologix, petri.lehtinen, rhettinger, skrah
Date 2012-03-20.19:12:50
SpamBayes Score 0.010668287
Marked as misclassified No
Message-id <1332270771.38.0.825728506997.issue14370@psf.upfronthosting.co.za>
In-reply-to
Content
This a feature, not a bug.  Lists are allowed to mutate during iteration and there are valid use cases for doing so (adding pending tasks, etc.)  


# Demonstrate list mutation during iteration
# Infinite loop that overflows memory
s = [None]
for x in s:
   s.append(x)
History
Date User Action Args
2012-03-20 19:12:51rhettingersetrecipients: + rhettinger, giampaolo.rodola, brian.curtin, skrah, neologix, petri.lehtinen, aaron315
2012-03-20 19:12:51rhettingersetmessageid: <1332270771.38.0.825728506997.issue14370@psf.upfronthosting.co.za>
2012-03-20 19:12:50rhettingerlinkissue14370 messages
2012-03-20 19:12:50rhettingercreate