]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
authorIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
Mon, 14 Mar 2022 23:28:54 +0000 (23:28 +0000)
committerGitHub <noreply@github.com>
Mon, 14 Mar 2022 23:28:54 +0000 (23:28 +0000)
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 2d4cfb5b7aeb8f5832ede43e8062f5b2d78a6f92..e255d4ae5f86f6cea6c89062b816700e203c8474 100644 (file)
@@ -1501,7 +1501,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)
@@ -1511,7 +1511,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)
@@ -1521,7 +1521,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)