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

Document and use Argument.scan where possible #121

Merged
merged 3 commits into from
Aug 25, 2021

Conversation

skrobinson
Copy link
Contributor

No description provided.

IMHO, the .scan function and its supporting functions are beautiful
metaprogramming that needs to be more visible to argparse users.  As a
start, document the function, with simple examples.

Signed-off-by: Sean Robinson <[email protected]>
…README

To better show the built-in conversion to a primitive type, use .scan in
examples.

Signed-off-by: Sean Robinson <[email protected]>
…tests

Argument.scan handles simple string to numeric type conversions, removing
the need to create a lambda.  Argument.action is still necessary for more
complex conversions and those are left unchanged.

Signed-off-by: Sean Robinson <[email protected]>
@p-ranav p-ranav merged commit 4d03fc0 into p-ranav:master Aug 25, 2021
@skrobinson skrobinson deleted the wip-add-scan-docs branch September 16, 2021 19:17
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.

2 participants