From 86eb93fae6fc5bf121de815b82697f2bc5bc126c Mon Sep 17 00:00:00 2001 From: Mariatta Date: Sun, 4 Jun 2017 20:06:48 -0700 Subject: [PATCH] bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953) Update the code example in Functions and Methods section Remove objtype argument in MethodType (cherry picked from commit 1bced56567335745f91676192fc39c06aab30da9) --- Doc/howto/descriptor.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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:: -- 2.50.0