]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Mon, 14 Mar 2022 23:55:12 +0000 (16:55 -0700)
committerGitHub <noreply@github.com>
Mon, 14 Mar 2022 23:55:12 +0000 (16:55 -0700)
(cherry picked from commit e3d348a5252549708fd19338b675a2c23b60d677)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
Misc/NEWS.d/next/Core and Builtins/2022-02-01-10-05-27.bpo-43721.-1XAIo.rst [new file with mode: 0644]
Objects/descrobject.c

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 (file)
index 0000000..4e3ad02
--- /dev/null
@@ -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
index ee40645955206726a7f30b7ee560a12bd777e037..00349ab17912e1fdef05543b2c14c64fd85dd7e6 100644 (file)
@@ -1508,7 +1508,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)
@@ -1518,7 +1518,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)
@@ -1528,7 +1528,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)