Skip to content

Is it possible to take an argument as both positional and by flag? #1818

Answered by CreepySkeleton
casey asked this question in Q&A
Discussion options

You must be logged in to vote

You can define input_pos as required_unless(input_flag). This will give you exactly what you want.

Replies: 5 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@casey
Comment options

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by pksunkara
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@epage
Comment options

@tmillr
Comment options

@epage
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
6 participants