Is it possible, somehow, to aassign a condtional statement toan optional argument?
My initial attempts, using the following construct, have been unsuccessful:
y = {some value} if x == {someValue} else {anotherValue}
where x has assigned beforehand.
More specifically, I want my function signature to look something like:
def x(a, b = 'a' if someModule.someFunction() else someModule.someOtherFunction()):
:
:
Many thanks