Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

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)

----------
nosy: +rhettinger
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14370>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to