Anmol Gupta added the comment:
And also a small explanation for why there would be an infinite loop without
creating a copy.
--
___
Python tracker
<http://bugs.python.org/issue30
Anmol Gupta added the comment:
Wrong documentaion section linked.
Correct seciton: Section 4.2 on
https://docs.python.org/3/tutorial/controlflow.html
The last line needs more explanation.
--
___
Python tracker
<http://bugs.python.org/issue30
New submission from Anmol Gupta:
Documentation section:
https://docs.python.org/3/reference/compound_stmts.html#for
The documentation does not explain at all why is there an infinite loop when
not using a copy of the list.
It leaves the reader in a confused state.
Even there are questions
Changes by Anmol Gupta :
--
assignee: docs@python
components: Documentation
nosy: Anmol Gupta, docs@python
priority: normal
severity: normal
status: open
title: More details in reference 'Looping through a list in Python and
modifying it'
type: enhancement
versions: