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 ammar2
Recipients Saps, ammar2
Date 2018-10-19.02:53:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1539917581.91.0.788709270274.issue35023@psf.upfronthosting.co.za>
In-reply-to
Content
Modifying containers while iterating over them is generally not safe. In this case the iterator at the point you start the loop will contain all the items to iterate over, adding them mid-loop will not cause them to be iterated over.

Take a look at the last section here for suggestions: https://docs.python.org/3/tutorial/datastructures.html#looping-techniques
History
Date User Action Args
2018-10-19 02:53:01ammar2setrecipients: + ammar2, Saps
2018-10-19 02:53:01ammar2setmessageid: <1539917581.91.0.788709270274.issue35023@psf.upfronthosting.co.za>
2018-10-19 02:53:01ammar2linkissue35023 messages
2018-10-19 02:53:01ammar2create