Message156448
| 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) |
|