From e7991b829b15ab63830d5f06977c09643b1920a7 Mon Sep 17 00:00:00 2001 From: Nicko van Someren Date: Sat, 18 Feb 2023 11:44:41 -0700 Subject: [PATCH] bpo-46978: Correct docstrings for in-place builtin operators (#31802) (cherry picked from commit 128379b8cdb88a6d3d7fed24df082c9a654b3fb8) --- .../Core and Builtins/2022-03-10-21-48-05.bpo-46978.f5QFfw.rst | 1 + Objects/typeobject.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2022-03-10-21-48-05.bpo-46978.f5QFfw.rst diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-03-10-21-48-05.bpo-46978.f5QFfw.rst b/Misc/NEWS.d/next/Core and Builtins/2022-03-10-21-48-05.bpo-46978.f5QFfw.rst new file mode 100644 index 00000000000000..72291d042a0394 --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-03-10-21-48-05.bpo-46978.f5QFfw.rst @@ -0,0 +1 @@ +Fixed docstrings for in-place operators of built-in types. diff --git a/Objects/typeobject.c b/Objects/typeobject.c index d3a0bba20a711c..279661c3f195b2 100644 --- a/Objects/typeobject.c +++ b/Objects/typeobject.c @@ -7897,7 +7897,7 @@ typedef struct wrapperbase slotdef; NAME "($self, /)\n--\n\n" DOC) #define IBSLOT(NAME, SLOT, FUNCTION, WRAPPER, DOC) \ ETSLOT(NAME, as_number.SLOT, FUNCTION, WRAPPER, \ - NAME "($self, value, /)\n--\n\nReturn self" DOC "value.") + NAME "($self, value, /)\n--\n\nCompute self " DOC " value.") #define BINSLOT(NAME, SLOT, FUNCTION, DOC) \ ETSLOT(NAME, as_number.SLOT, FUNCTION, wrap_binaryfunc_l, \ NAME "($self, value, /)\n--\n\nReturn self" DOC "value.")