summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMariano Anaya <rmariano@users.noreply.github.com>2017-06-05 04:46:50 +0200
committerMariatta <Mariatta@users.noreply.github.com>2017-06-04 19:46:50 -0700
commit1bced56567335745f91676192fc39c06aab30da9 (patch)
treea405b8d5f49e8fa4d021007edcfae5c41f7ab551
parentd3bedf356aca04ed9135a84b08f5cf229000176e (diff)
downloadcpython-git-1bced56567335745f91676192fc39c06aab30da9.tar.gz
bpo-30530: Update Descriptor How To Documentation (GH-1845)
Update the code example in Functions and Methods section Remove objtype argument in MethodType
-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 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::