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

default_value must be called before store_into #347

Open
abellgithub opened this issue Apr 29, 2024 · 0 comments
Open

default_value must be called before store_into #347

abellgithub opened this issue Apr 29, 2024 · 0 comments

Comments

@abellgithub
Copy link
Contributor

store_into captures the default value at the time it is called, rather than at parse time. This arrangement ignores the default argument if default_value is called for an argument after store_into. IMO setting a value with the default argument should be deferred into the args are parsed and it is clear that there is no argument provided that would otherwise be associated with the provided default. This doesn't seem to be documented and is easy to get wrong.

I'm happy to take a stab at fixing if this isn't by design.

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

No branches or pull requests

1 participant