New submission from Mark Sapiro <mark(a)msapiro.net>:
In several places in the documentation including:
```
grep -rn 'pop.\[i\]'
Lib/pydoc_data/topics.py:13184: '| "s.pop([i])" | retrieves the item at *i* '
Lib/pydoc_data/topics.py:13647: '| "s.pop([i])" | retrieves the item at '
Doc/tutorial/datastructures.rst:47:.. method:: list.pop([i])
Doc/library/array.rst:193:.. method:: array.pop([i])
Doc/library/stdtypes.rst:1116:| ``s.pop([i])`` | retrieves the item at *i* and | \(2) |
```
the mutable sequence and array `pop()` method is documented as shown above in a way that implies the argument to `pop()` is a slice or sequence when it is actually just an integer. All those references should be `pop(i)` rather than `pop([i])`.
----------
assignee: docs@python
components: Documentation
messages: 392551
nosy: docs@python, msapiro
priority: normal
severity: normal
status: open
title: Doc for mutable sequence pop() method implies argument is a slice or sequence.
type: behavior
versions: Python 3.10, Python 3.11, Python 3.8, Python 3.9
_______________________________________
Python tracker <report(a)bugs.python.org>
<https://bugs.python.org/issue43996>
_______________________________________
New submission from Roy Smith:
For background, see:
https://mail.python.org/pipermail/python-list/2014-August/676291.html
In a nutshell, the iglob() docs say, "Return an iterator which yields the same values as glob() without actually storing them all simultaneously." The problem is, internally, it calls os.listdir(), which apparently *does* store the entire list internally, defeating the whole purpose of iglob()
I recognize that iglob() is not going to get fixed in 2.7, but at least the documentation should be updated to point out that it doesn't really do what it says it does. Or rather, it doesn't really not do what it says it doesn't :-)
----------
assignee: docs@python
components: Documentation
messages: 225048
nosy: docs@python, roysmith
priority: normal
severity: normal
status: open
title: iglob() has misleading documentation (does indeed store names internally)
type: enhancement
versions: Python 2.7
_______________________________________
Python tracker <report(a)bugs.python.org>
<http://bugs.python.org/issue22167>
_______________________________________