Message408680
The language reference about the 'for' statement (https://docs.python.org/3/reference/compound_stmts.html#the-for-statement) has a "Note" box that states that the for statement uses an "internal counter" which is "incremented", and goes into detail about what happens when modifications happen before or after the current loop position. Surely this depends on the underlying iterator? For example, with a balanced tree an insert or a delete could completely re-jigger the tree with hard-to-predict results on an iterator. |
|
Date |
User |
Action |
Args |
2021-12-16 09:48:01 | turepalsson | set | recipients:
+ turepalsson, docs@python |
2021-12-16 09:48:01 | turepalsson | set | messageid: <1639648081.19.0.0569018631816.issue46095@roundup.psfhosted.org> |
2021-12-16 09:48:01 | turepalsson | link | issue46095 messages |
2021-12-16 09:48:01 | turepalsson | create | |
|