[issue3568] list enumeration corrupt when remove()

2008-08-16 Thread Terry J. Reedy
Terry J. Reedy <[EMAIL PROTECTED]> added the comment: Since you are just beginning Python, I suggest you report questionable program behavior on newsgroups comp.lang.python, gmane.comp.python.general at news.gmane.org, or the python.org mailing list python-list (all three are equivalent). --

[issue3568] list enumeration corrupt when remove()

2008-08-16 Thread Benjamin Peterson
Benjamin Peterson <[EMAIL PROTECTED]> added the comment: It's a known fact that mutating a list during iteration will cause problems. You should mutate a copy of the list. -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___

[issue3568] list enumeration corrupt when remove()

2008-08-16 Thread Jacek
New submission from Jacek <[EMAIL PROTECTED]>: Hi I wrote my first program in python, and I found bug in it. I explain it in example (I do it under Windows XP): 1. At the begining create some directories: >mkdir .\test\ >mkdir .\test\.svn >mkdir .\test\cvs >mkdir .\test\pdk 2. Next create file