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 0000000..4e3ad02
--- /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 26726cc..09b0f82 100644
--- a/Objects/descrobject.c
+++ b/Objects/descrobject.c
@@ -1510,7 +1510,7 @@
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 @@
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 @@
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)