From: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> Date: Mon, 14 Mar 2022 23:51:55 +0000 (-0700) Subject: bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046) X-Git-Tag: v3.10.3~7 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=cebdc325580b49f4c7eb3c61a24c9e7f41ca736b;p=thirdparty%2FPython%2Fcpython.git bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046) (cherry picked from commit e3d348a5252549708fd19338b675a2c23b60d677) Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> --- diff --git a/Misc/NEWS.d/next/Core and Builtins/2022-02-01-10-05-27.bpo-43721.-1XAIo.rst b/Misc/NEWS.d/next/Core and Builtins/2022-02-01-10-05-27.bpo-43721.-1XAIo.rst new file mode 100644 index 000000000000..4e3ad02057ad --- /dev/null +++ b/Misc/NEWS.d/next/Core and Builtins/2022-02-01-10-05-27.bpo-43721.-1XAIo.rst @@ -0,0 +1 @@ +Fix docstrings of :attr:`~property.getter`, :attr:`~property.setter`, and :attr:`~property.deleter` to clarify that they create a new copy of the property. \ No newline at end of file diff --git a/Objects/descrobject.c b/Objects/descrobject.c index 26726cc0973d..09b0f82c6990 100644 --- a/Objects/descrobject.c +++ b/Objects/descrobject.c @@ -1510,7 +1510,7 @@ static PyMemberDef property_members[] = { PyDoc_STRVAR(getter_doc, - "Descriptor to change the getter on a property."); + "Descriptor to obtain a copy of the property with a different getter."); static PyObject * property_getter(PyObject *self, PyObject *getter) @@ -1520,7 +1520,7 @@ property_getter(PyObject *self, PyObject *getter) PyDoc_STRVAR(setter_doc, - "Descriptor to change the setter on a property."); + "Descriptor to obtain a copy of the property with a different setter."); static PyObject * property_setter(PyObject *self, PyObject *setter) @@ -1530,7 +1530,7 @@ property_setter(PyObject *self, PyObject *setter) PyDoc_STRVAR(deleter_doc, - "Descriptor to change the deleter on a property."); + "Descriptor to obtain a copy of the property with a different deleter."); static PyObject * property_deleter(PyObject *self, PyObject *deleter)