bpo-30530: Update Descriptor How To Documentation (GH-1845) (GH-1953) · python/cpython@86eb93f (original) (raw)
Navigation Menu
- GitHub Copilot Write better code with AI
- GitHub Models New Manage and compare prompts
- GitHub Advanced Security Find and fix vulnerabilities
- Actions Automate any workflow
- Codespaces Instant dev environments
- Issues Plan and track work
- Code Review Manage code changes
- Discussions Collaborate outside of code
- Code Search Find more, search less
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 86eb93f
Update the code example in Functions and Methods section Remove objtype argument in MethodType (cherry picked from commit 1bced56)
File tree
1 file changed
lines changed
1 file changed
lines changed
Lines changed: 1 addition & 1 deletion
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 |