[Python-Dev] Re: A cute new way to get an infinite loop (original) (raw)
Delaney, Timothy C (Timothy) tdelaney at avaya.com
Fri Sep 24 03:17:06 CEST 2004
- Previous message: [Python-Dev] A cute new way to get an infinite loop
- Next message: [Python-Dev] Methods identity...?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Terry Reedy wrote:
So, are things like this a programming bug, interpreter bug, or language definition bug? or just a 'gotcha'?
Gotcha. In pretty much every language, you have to be careful about modifying what you're iterating over. I don't see that Python should be any different ;)
However, Tim's example is a bit less obvious that you are modifying the thing you're iterating over ... Hence the "cuteness" IMO.
Tim Delaney
- Previous message: [Python-Dev] A cute new way to get an infinite loop
- Next message: [Python-Dev] Methods identity...?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]