summaryrefslogtreecommitdiffstats
path: root/Doc/howto
diff options
context:
space:
mode:
authorMariano Anaya <rmariano@users.noreply.github.com>2017-06-05 02:46:50 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-06-05 02:46:50 (GMT)
commit1bced56567335745f91676192fc39c06aab30da9 (patch)
treea405b8d5f49e8fa4d021007edcfae5c41f7ab551 /Doc/howto
parentd3bedf356aca04ed9135a84b08f5cf229000176e (diff)
downloadcpython-1bced56567335745f91676192fc39c06aab30da9.zip
cpython-1bced56567335745f91676192fc39c06aab30da9.tar.gz
cpython-1bced56567335745f91676192fc39c06aab30da9.tar.bz2
bpo-30530: Update Descriptor How To Documentation (GH-1845)
Update the code example in Functions and Methods section Remove objtype argument in MethodType
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::