From: Mariatta Date: Mon, 5 Jun 2017 03:09:16 +0000 (-0700) Subject: bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1954) X-Git-Tag: v3.5.4rc1~111 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1f04b900861686351977f6a7d51afa5fdc181b82;p=python 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) --- diff --git a/Doc/howto/descriptor.rst b/Doc/howto/descriptor.rst index c2bf473e1f..2dd6c34e2c 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::