-
-
Notifications
You must be signed in to change notification settings - Fork 31.9k
bpo-41609: Fix output of pdb's whatis command for instance methods #21935
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@blueyed, @FrontSide, are you able to review this? |
I don't think I'm the right person to review this. @iritkatriel |
Thanks! ✨ 🍰 ✨ |
Thanks @iritkatriel for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.8. |
Thanks @iritkatriel for the PR, and @ambv for merging it 🌮🎉.. I'm working now to backport this PR to: 3.9. |
GH-21976 is a backport of this pull request to the 3.8 branch. |
GH-21977 is a backport of this pull request to the 3.9 branch. |
…ythonGH-21935) (cherry picked from commit 022bc75) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
…ythonGH-21935) (cherry picked from commit 022bc75) Co-authored-by: Irit Katriel <iritkatriel@yahoo.com>
pdb's whatis command prints 'Function' instead of 'Method' for a bound method:
The reason for this that it first checks whether there is a code attribute (which both methods and functions have) and only afterwards checks for func.code.
This PR adds the missing test and re-orders the code in do_whatis so that it first checks for Method and then for Function.
https://bugs.python.org/issue41609