Can I simply this function:
def fun1(param, value, send):
if send == True:
fun2(**{param:value})
else:
fun2()
>Solution :
You could put the if...else inside the function argument:
def fun1(param, value, send):
return fun2(**({param:value} if send else {}))