May I loop over a changing list?

skaller skaller at maxtal.com.au
Tue Sep 28 15:26:38 EDT 1999


Olaf Delgado wrote:
> Of course, the interpreter
> might do some clever optimization for builtin types, or there might be
> alternative ways to implement for loops in future versions of python.
> 
> So, the _real_ question (tm) here is: is the passage in the tutorial a
> "Don't do it, it's undefined." or a "Oh no, kiddy, this will confuse your
> little mind."?

This is a long standing problem with python. The 'reference manual'
documents what the current version of the interpreter does,
rather than providing a language specification. However, the
manual is now in a reasonable state, and a more formal partition
between language semantics and implementation details could
be implemented, if only the two could be disentangled :-)

-- 
John Skaller, mailto:skaller at maxtal.com.au
1/10 Toxteth Rd Glebe NSW 2037 Australia
homepage: http://www.maxtal.com.au/~skaller
downloads: http://www.triode.net.au/~skaller




More information about the Python-list mailing list