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: Descriptors HowTo: Example on function.__get__ needs update
Type: Stage: resolved
Components: Documentation Versions: Python 3.7, Python 3.6, Python 3.5
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Mariatta Nosy List: Mariano Anaya, Mariatta, docs@python, rhettinger
Priority: normal Keywords:

Created on 2017-05-31 21:11 by Mariano Anaya, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 1845 merged Mariano Anaya, 2017-05-31 21:11
PR 1953 merged Mariatta, 2017-06-05 02:48
PR 1954 merged Mariatta, 2017-06-05 02:48
Messages (6)
msg294871 - (view) Author: Mariano Anaya (Mariano Anaya) * Date: 2017-05-31 21:11
The example on which tries to create a method from the function's __get__ doesn't work for Python 3.5+. It would give this error:

TypeError: method expected 2 arguments, got 3

The 3rd parameter, needs to be removed.
msg295136 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2017-06-04 17:41
Mariatta, feel free to apply and backport once the CLA is signed.
msg295154 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-05 02:46
New changeset 1bced56567335745f91676192fc39c06aab30da9 by Mariatta (Mariano Anaya) in branch 'master':
bpo-30530: Update Descriptor How To Documentation (GH-1845)
https://github.com/python/cpython/commit/1bced56567335745f91676192fc39c06aab30da9
msg295157 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-05 03:06
New changeset 86eb93fae6fc5bf121de815b82697f2bc5bc126c by Mariatta in branch '3.6':
bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953)
https://github.com/python/cpython/commit/86eb93fae6fc5bf121de815b82697f2bc5bc126c
msg295158 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-05 03:09
New changeset 1f04b900861686351977f6a7d51afa5fdc181b82 by Mariatta in branch '3.5':
bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1954)
https://github.com/python/cpython/commit/1f04b900861686351977f6a7d51afa5fdc181b82
msg295159 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-05 03:10
Thanks Mariano. I merged your PR and it's been backported to 3.5 and 3.6.
History
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74715
2017-06-05 03:10:35Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg295159

stage: backport needed -> resolved
2017-06-05 03:09:18Mariattasetmessages: + msg295158
2017-06-05 03:06:50Mariattasetmessages: + msg295157
2017-06-05 02:49:08Mariattasetstage: patch review -> backport needed
2017-06-05 02:48:53Mariattasetpull_requests: + pull_request2025
2017-06-05 02:48:45Mariattasetpull_requests: + pull_request2024
2017-06-05 02:46:52Mariattasetmessages: + msg295154
2017-06-04 17:41:43rhettingersetassignee: docs@python -> Mariatta

messages: + msg295136
nosy: + Mariatta, rhettinger
2017-05-31 22:21:14Mariattasetstage: patch review
2017-05-31 21:11:25Mariano Anayacreate