Skip to content
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

bpo-34235: PyArg_ParseTupleAndKeywords: support required keyword arguments #11834

Closed
wants to merge 3 commits into from

Conversation

msullivan
Copy link
Contributor

@msullivan msullivan commented Feb 13, 2019

This adds a @ glyph to the PyArg_ParseTupleAndKeywords that
specifies that subsequent arguments are required keyword-only
arguments. It must appear after | and $, and allows functions to
take all four combinations of positional/named-only
v. required/optional arguments.

The restriction that @ only appear after | and $ have already
appeared is because it substantially simplifies the state machine and
because $ already only works properly when | is specified (though
this is not checked).

https://bugs.python.org/issue34235

msullivan added 2 commits Feb 13, 2019
…ments

This adds a `@` glyph to the PyArg_ParseTupleAndKeywords that
specifies that subsequent arguments are required keyword-only
arguments. It must appear after `|` and `$`, and allows functions to
take all four combinations of positional/named-only
v. required/optional arguments.

The restriction that `@` only appear after `|` and `$` have already
appeared is because it substantially simplifies the state machine and
because `$` already only works properly when `|` is specified (though
this is not *checked*).
auvipy
auvipy approved these changes Feb 18, 2019
@vstinner
Copy link
Member

vstinner commented Feb 18, 2019

@serhiy-storchaka: Would you mind to review this PR?

@serhiy-storchaka
Copy link
Member

serhiy-storchaka commented Feb 19, 2019

I want to try other options first.

@msullivan
Copy link
Contributor Author

msullivan commented Feb 21, 2019

I'm working on trying out some of the other options that Serhiy suggested, but have been busy

Copy link
Member

@iritkatriel iritkatriel left a comment

This has merge conflicts now, as well as an unresolved discussion.

@bedevere-bot
Copy link

bedevere-bot commented Dec 7, 2022

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

And if you don't make the requested changes, you will be put in the comfy chair!

@msullivan
Copy link
Contributor Author

msullivan commented Dec 7, 2022

I can come back to this if there's any interest, but it wasn't clear to me that anybody wanted this but me

@msullivan msullivan closed this Dec 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

8 participants