classification
Title: Documentation of property.{getter,setter,deleter} fails to mention that a *new* property is returned
Type: Stage:
Components: Documentation Versions:
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Antony.Lee, docs@python, rhettinger
Priority: normal Keywords:

Created on 2021-04-03 23:10 by Antony.Lee, last changed 2021-04-04 00:31 by rhettinger.

Messages (1)
msg390149 - (view) Author: Antony Lee (Antony.Lee) * Date: 2021-04-03 23:10
property.{getter,setter,deleter} returns a new property with a new {fget,fset,fdel}.  This is documented at https://docs.python.org/3/library/functions.html#property, and intended behavior (see e.g. https://bugs.python.org/issue1620).

However the corresponding docstrings, e.g. `pydoc property.getter`, are "Descriptor to change the getter (setter, deleter) on a property."  This wording suggests that no copy is being made and that the property is mutated in-place.
History
Date User Action Args
2021-04-04 00:31:57rhettingersetassignee: rhettinger ->
2021-04-04 00:27:28rhettingersetassignee: docs@python -> rhettinger

nosy: + rhettinger
2021-04-03 23:10:19Antony.Leecreate