[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-07-03 Thread Anmol Gupta

Anmol Gupta added the comment:

And also a small explanation for why there would be an infinite loop without 
creating a copy.

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30826>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-07-02 Thread Anmol Gupta

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 <rep...@bugs.python.org>
<http://bugs.python.org/issue30826>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-07-01 Thread Anmol Gupta

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 concerning the same on stackoverlflow: 
https://stackoverflow.com/questions/44633798/loop-through-a-list-in-python-and-modify-it

--

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30826>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue30826] More details in reference 'Looping through a list in Python and modifying it'

2017-07-01 Thread Anmol Gupta

Changes by Anmol Gupta <guptaanmol...@gmail.com>:


--
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: Python 3.6

___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue30826>
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com