Deleting is quite error prone, but appending during iteration is very useful in 
implementing an iterative form of recursive algorithms. It effectively gives a 
FIFO queue which remembers all items after you're done. In general the 
behaviour of a list iterator can be understood completely if you explain that 
it simply remembers the current index.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/I7NCT4F2CXK7O4WHJCXNWGXRZM6BDDPP/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to