Skip to content
Discussion options

You must be logged in to vote

The idea of default value is that it will be used if user doesn't specify this option at all

python scratch.py

python scratch.py -n will not work here, because Typer needs to know the exact number of values to expect for this option.
Otherwise we would have ambiguity: is the value after -n the value of this option or the value of another argument?

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by wu-clan
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Question or problem
2 participants