mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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:
parent
9f1587e8d3
commit
cebdc32558
2 changed files with 4 additions and 3 deletions
|
@ -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.
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue