Strange behavior

Alain Ketterlin alain at dpt-info.u-strasbg.fr
Wed Aug 15 05:57:59 EDT 2012


light1quark at gmail.com writes:

> I got my answer by reading your posts and referring to:
> http://docs.python.org/reference/compound_stmts.html#the-for-statement
> (particularly the shaded grey box)

Not that the problem is not specific to python (if you erase the current
element when traversing a STL list in C++ you'll get a crash as well).

> I guess I should have (obviously) looked at the doc's before posting
> here; but im a noob.

Python has several surprising features. I think it is a good idea to
take some time to read the language reference, from cover to cover
(before or after the various tutorials, depending on your background).

-- Alain.



More information about the Python-list mailing list