This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Minor docstring improvement in __contains__
Type: enhancement Stage: patch review
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7, Python 3.6
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Ivan.Savov, docs@python
Priority: normal Keywords: patch

Created on 2021-10-18 22:49 by Ivan.Savov, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 29043 Ivan.Savov, 2021-10-18 23:00
Messages (1)
msg404236 - (view) Author: Ivan Savov (Ivan.Savov) * Date: 2021-10-18 22:49
Currently,

```
>>> help(list.__contains__)
```
returns
```
Help on wrapper_descriptor:
__contains__(self, key, /)
    Return key in self.
```

Which is a conceptual circular reference,
since `in` is implemented by `__contains__`.

Changing the help string to

"Return True if key in self."

would fix this.
History
Date User Action Args
2022-04-11 14:59:51adminsetgithub: 89682
2021-10-18 23:00:33Ivan.Savovsetkeywords: + patch
stage: patch review
pull_requests: + pull_request27314
2021-10-18 22:49:58Ivan.Savovcreate