[issue30530] Descriptors HowTo: Example on function.__get__ needs update

New submission from Mariano Anaya: 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. ---------- assignee: docs@python components: Documentation messages: 294871 nosy: Mariano Anaya, docs@python priority: normal pull_requests: 1967 severity: normal status: open title: Descriptors HowTo: Example on function.__get__ needs update versions: Python 3.5, Python 3.6, Python 3.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- stage: -> patch review _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Raymond Hettinger added the comment: Mariatta, feel free to apply and backport once the CLA is signed. ---------- assignee: docs@python -> Mariatta nosy: +Mariatta, rhettinger _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Mariatta Wijaya added the comment: 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/1bced56567335745f91676192fc39c06aab... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +2024 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- pull_requests: +2025 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Changes by Mariatta Wijaya <mariatta.wijaya@gmail.com>: ---------- stage: patch review -> backport needed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Mariatta Wijaya added the comment: 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/86eb93fae6fc5bf121de815b82697f2bc5b... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Mariatta Wijaya added the comment: 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/1f04b900861686351977f6a7d51afa5fdc1... ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________

Mariatta Wijaya added the comment: Thanks Mariano. I merged your PR and it's been backported to 3.5 and 3.6. ---------- resolution: -> fixed stage: backport needed -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue30530> _______________________________________
participants (3)
-
Mariano Anaya
-
Mariatta Wijaya
-
Raymond Hettinger