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: Doc strings for built-in, in-place operators are misleading
Type: behavior Stage: patch review
Components: Interpreter Core Versions: Python 3.11, Python 3.10, Python 3.9, Python 3.8, Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: nickovs
Priority: normal Keywords: patch

Created on 2022-03-10 19:36 by nickovs, last changed 2022-04-11 14:59 by admin.

Pull Requests
URL Status Linked Edit
PR 31802 open nickovs, 2022-03-10 21:33
Messages (1)
msg414876 - (view) Author: Nicko van Someren (nickovs) * Date: 2022-03-10 19:36
Objects/typeobject.c uses slots to implement various operators and the IBSLOT macro is used to define slot entries for in-place binary operators. This macro creates a __doc__ string for the operators of the form "Return self<op>value."

This doc string is misleading since an in-place operator statement can not be used as an L-value, so nothing is "returned".

To fix this, the macro definition for IBSLOT should be updated to use a different word or phrase, such as "Compute self<op>value."
History
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91134
2022-03-10 21:33:23nickovssetkeywords: + patch
stage: patch review
pull_requests: + pull_request29903
2022-03-10 19:36:25nickovscreate