-
-
Notifications
You must be signed in to change notification settings - Fork 781
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
Document how to use varargs in Argument Clinic #1277
base: main
Are you sure you want to change the base?
Conversation
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 might be higher up in the list.
Should **kwargs
be documented too, possibly together with *args
?
Thanks for the review!
Is it ok to move it below How to convert METH_O and METH_NOARGS functions?
According to python/cpython#64490, |
@ezio-melotti You have more experience with this tool than I do. Is this PR ready for merge? |
LGTM. @erlend-aasland? |
|
||
To convert a var-positional parameter function, | ||
prepending the parameter name with ``*`` , | ||
and the parameter should use the ``object`` converter:: |
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.
What happens if I use something else? E.g., what if I want to accept an arbitrary number of ints?
Also, what type does the implementation function receive?
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.
Thank you for the review! I have added a new paragraph to explain more about it.
Co-authored-by: Jelle Zijlstra <[email protected]>
This is related to python/cpython#64490
📚 Documentation preview 📚: https://cpython-devguide--1277.org.readthedocs.build/