Skip to content

Default that depends on previous arg #5582

Answered by epage
sr-gi asked this question in Q&A
Discussion options

You must be logged in to vote

Is it possible to have a default from arg B that depends on the value of arg A,

At this time, no. We'd likely defer this to #3476.

Alternatively, is there a way of making B required if A is not defaulted?

On A could you put requires = "B"? We have a couple different requires or required functions to check out. I always get the relationships of these backwards, so check the other requires or required functions we have if that on doesn't work. If not, likely would point to #3476

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@sr-gi
Comment options

Answer selected by sr-gi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants