Skip to content

Commit 1bced56

Browse files
rmarianoMariatta
authored andcommitted
bpo-30530: Update Descriptor How To Documentation (GH-1845)
Update the code example in Functions and Methods section Remove objtype argument in MethodType
1 parent d3bedf3 commit 1bced56

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/howto/descriptor.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ this::
282282
. . .
283283
def __get__(self, obj, objtype=None):
284284
"Simulate func_descr_get() in Objects/funcobject.c"
285-
return types.MethodType(self, obj, objtype)
285+
return types.MethodType(self, obj)
286286

287287
Running the interpreter shows how the function descriptor works in practice::
288288

0 commit comments

Comments
 (0)