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

Support capturing remaining() arguments #57

Merged
merged 1 commit into from
Nov 21, 2019
Merged

Conversation

zhihaoy
Copy link
Contributor

@zhihaoy zhihaoy commented Nov 20, 2019

This kind of argument works as if having the "remaining" nargs,
inspired by Python's argparse.REMAINDER.

This change also reduces the size of Argument by 8 bytes.

See also: https://docs.python.org/2/library/argparse.html#nargs

PS1: document is missing, but in the unit test there is a test case "sum" for helping forming an official example.
PS2: after resolving #56, I think that's enough features for the next release. Thoughts?

fixes: #17

This kind of argument works as if having the "remaining" nargs,
inspired by Python's `argparse.REMAINDER`.

This change also reduces the size of `Argument` by 8 bytes.

See also: https://docs.python.org/2/library/argparse.html#nargs

fixes: p-ranav#17
@p-ranav
Copy link
Owner

p-ranav commented Nov 21, 2019

Yeah, we can release v2.0 once #56 is done. I'll go ahead and update the README regarding remaining(). Thanks!!

@p-ranav p-ranav merged commit 0cabe95 into p-ranav:master Nov 21, 2019
@zhihaoy zhihaoy deleted the remaining branch November 21, 2019 16:19
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.

Allow many positional arguments
2 participants