bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)

(cherry picked from commit e3d348a525)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2022-03-14 16:51:55 -07:00 committed by GitHub
parent 9f1587e8d3
commit cebdc32558
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 3 deletions

View file

@ -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.

View file

@ -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)