summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-06-05 03:06:48 (GMT)
committerGitHub <noreply@github.com>2017-06-05 03:06:48 (GMT)
commit86eb93fae6fc5bf121de815b82697f2bc5bc126c (patch)
tree79d3ce3c54e8345f8be4e6c8d5dc159a721b7217 /Doc/howto
parent47779d720a0fa0eec818065f41b17d0f2d77d3ff (diff)
downloadcpython-86eb93fae6fc5bf121de815b82697f2bc5bc126c.zip
cpython-86eb93fae6fc5bf121de815b82697f2bc5bc126c.tar.gz
cpython-86eb93fae6fc5bf121de815b82697f2bc5bc126c.tar.bz2
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)
Diffstat (limited to 'Doc/howto')
-rw-r--r--Doc/howto/descriptor.rst2
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::