Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Document how to use varargs in Argument Clinic#1277

Closed
aisk wants to merge 7 commits into
python:mainpython/devguide:mainfrom
aisk:ac-varargsCopy head branch name to clipboard
Closed

Document how to use varargs in Argument Clinic#1277
aisk wants to merge 7 commits into
python:mainpython/devguide:mainfrom
aisk:ac-varargsCopy head branch name to clipboard

Conversation

@aisk

@aisk aisk commented Feb 23, 2024

Copy link
Copy Markdown
Member

This is related to python/cpython#64490


📚 Documentation preview 📚: https://cpython-devguide--1277.org.readthedocs.build/

@erlend-aasland erlend-aasland self-requested a review February 23, 2024 23:48

@ezio-melotti ezio-melotti left a comment

Copy link
Copy Markdown
Member

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?

@aisk

aisk commented Feb 25, 2024

Copy link
Copy Markdown
Member Author

Thanks for the review!

This might be higher up in the list.

Is it ok to move it below How to convert METH_O and METH_NOARGS functions?

Should **kwargs be documented too, possibly together with *args?

According to python/cpython#64490, **kwargs is not supported by Argument Clinic.

@aisk aisk requested a review from ezio-melotti April 21, 2024 15:47
@willingc

Copy link
Copy Markdown
Collaborator

@ezio-melotti You have more experience with this tool than I do. Is this PR ready for merge?

@ezio-melotti

Copy link
Copy Markdown
Member

LGTM. @erlend-aasland?


To convert a var-positional parameter function,
prepending the parameter name with ``*`` ,
and the parameter should use the ``object`` converter::

Copy link
Copy Markdown
Member

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?

Copy link
Copy Markdown
Member Author

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.

Comment thread development-tools/clinic.rst Outdated
Comment thread development-tools/clinic.rst
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
@aisk aisk closed this by deleting the head repository Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.