bpo-30530: Update Descriptor How To Documentation (GH-1845) · python/cpython@1bced56 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 1bced56
authored and
committed
Update the code example in Functions and Methods section Remove objtype argument in MethodType
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -282,7 +282,7 @@ this:: | ||
282 | 282 | . . . |
283 | 283 | def __get__(self, obj, objtype=None): |
284 | 284 | "Simulate func_descr_get() in Objects/funcobject.c" |
285 | - return types.MethodType(self, obj, objtype) | |
285 | + return types.MethodType(self, obj) | |
286 | 286 | |
287 | 287 | Running the interpreter shows how the function descriptor works in practice:: |
288 | 288 |