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
gh-91098: Use Argument Clinic for Object/classobject.c to fix docstrings #31711
Conversation
Objects/classobject.c
Outdated
0, /* tp_as_number */ | ||
0, /* tp_as_sequence */ | ||
0, /* tp_as_mapping */ | ||
0, /*(hashfunc)instancemethod_hash, tp_hash */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vstinner Should instancemethod_hash
be kept or removed? It has been commented out since its introduction on 11 Dec 2007 .
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to have a separated PR to remove it.
Accidentally autoclosed by deleting a wrong remote branch. |
@@ -0,0 +1,4 @@ | |||
:func:`idlelib.calltip.get_argspec` now correctly reports that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is an odd way to put it. It's not idlelib that changed, but classobject.c. Can we just say something like "Use Argument Clinic for the types.MethodType constructor"?
/*[clinic input] | ||
@classmethod | ||
instancemethod.__new__ | ||
function: object |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's keep this positional-only.
Objects/classobject.c
Outdated
Create a bound instance method object."); | ||
/*[clinic input] | ||
@classmethod | ||
method.__new__ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
method.__new__ | |
method.__new__ as method_new |
A bit weird to have "method" as a function name in C. Same for instancemethod below.
@JelleZijlstra Thank you for the review, addressed. |
Closes GH-91098.