In this post, we will see how to resolve Find missing arguments of a calling function
Question:
I am trying to write a function that can return which arguments from the calling function are missing.z
was not supplied in the calling function. I would also like to be able to pass which arguments I care about to find_missing_args
, so for example:func(x = 1, y = 2, a = 3, b = 4)
will return:a
, b
, c
.UPDATE WITH ANSWER:
c()
to be the argument c
and not the function c()
.Best Answer:
I don’t delve into these sorts of mechanics often, so I’m not sure how robust or “idiomatic” this is, but I think this gets at what you want?If you have better answer, please add a comment about this, thank you!
Source: Stackoverflow.com