Commit 1bced565 authored by Mariano Anaya's avatar Mariano Anaya Committed by Mariatta

bpo-30530: Update Descriptor How To Documentation (GH-1845)

Update the code example in Functions and Methods section
Remove objtype argument in MethodType
parent d3bedf35
......@@ -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::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment