diff options
author | Mariatta <Mariatta@users.noreply.github.com> | 2017-06-05 03:09:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-05 03:09:16 (GMT) |
commit | 1f04b900861686351977f6a7d51afa5fdc181b82 (patch) | |
tree | d2335cf8a3559a8db64754be312933793302205a /Doc/howto | |
parent | b9c4f3ce96991fda43caecfbf3aab7f9d47158ed (diff) | |
download | cpython-1f04b900861686351977f6a7d51afa5fdc181b82.zip cpython-1f04b900861686351977f6a7d51afa5fdc181b82.tar.gz cpython-1f04b900861686351977f6a7d51afa5fdc181b82.tar.bz2 |
bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1954)
Update the code example in Functions and Methods section
Remove objtype argument in MethodType
(cherry picked from commit 1bced56567335745f91676192fc39c06aab30da9)
Diffstat (limited to 'Doc/howto')
-rw-r--r-- | Doc/howto/descriptor.rst | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index c2bf473..2dd6c34 100644 --- a/Doc/howto/descriptor.rst +++ b/Doc/howto/descriptor.rst @@ -282,7 +282,7 @@ this:: . . . def __get__(self, obj, objtype=None): "Simulate func_descr_get() in Objects/funcobject.c" - return types.MethodType(self, obj, objtype) + return types.MethodType(self, obj) Running the interpreter shows how the function descriptor works in practice:: |