This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Documentation of property.{getter,setter,deleter} fails to mention that a *new* property is returned
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.11, Python 3.10, Python 3.9
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: docs@python, hugovk, iritkatriel, miss-islington, rhettinger
Priority: normal Keywords: patch

Created on 2021-04-03 23:10 by Antony.Lee, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31046 merged iritkatriel, 2022-02-01 10:02
PR 31886 merged miss-islington, 2022-03-14 23:29
PR 31887 merged miss-islington, 2022-03-14 23:29
PR 31893 merged hugovk, 2022-03-15 07:54
Messages (4)
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.
msg415208 - (view) Author: Irit Katriel (iritkatriel) * (Python committer) Date: 2022-03-14 23:29
New changeset e3d348a5252549708fd19338b675a2c23b60d677 by Irit Katriel in branch 'main':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/e3d348a5252549708fd19338b675a2c23b60d677
msg415209 - (view) Author: miss-islington (miss-islington) Date: 2022-03-14 23:52
New changeset cebdc325580b49f4c7eb3c61a24c9e7f41ca736b by Miss Islington (bot) in branch '3.10':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/cebdc325580b49f4c7eb3c61a24c9e7f41ca736b
msg415210 - (view) Author: miss-islington (miss-islington) Date: 2022-03-14 23:55
New changeset f1a5e1b89a526da0d66c5b368c924298291abb1a by Miss Islington (bot) in branch '3.9':
bpo-43721: Fix docstrings for property.getter/setter/deleter (GH-31046)
https://github.com/python/cpython/commit/f1a5e1b89a526da0d66c5b368c924298291abb1a
History
Date User Action Args
2022-04-11 14:59:43adminsetgithub: 87887
2022-03-15 07:54:28hugovksetnosy: + hugovk

pull_requests: + pull_request29991
2022-03-15 00:12:50AlexWaygoodsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2022-03-14 23:55:22miss-islingtonsetmessages: + msg415210
2022-03-14 23:52:04miss-islingtonsetmessages: + msg415209
2022-03-14 23:29:45miss-islingtonsetpull_requests: + pull_request29985
2022-03-14 23:29:41miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request29984
2022-03-14 23:29:05iritkatrielsetmessages: + msg415208
2022-02-01 11:01:28Antony.Leesetnosy: - Antony.Lee
2022-02-01 10:07:27iritkatrielsettype: behavior
versions: + Python 3.9, Python 3.10, Python 3.11
2022-02-01 10:02:55iritkatrielsetkeywords: + patch
nosy: + iritkatriel

pull_requests: + pull_request29227
stage: patch review
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