Are you referring to passing functions as arguments to your functions? If so, and if those functions that serve as arguments are defined within certain modules, then import those modules. Here is an example:
import math # source of the definitions
def sum_of_function_results(val, *funcs):
return sum([func(val) for func in funcs])
print(sum_of_function_results(math.pi / 4, math.sin, math.cos, math.tan))
No, see how you defined the arguments in the function call? They were different than the original parameters in the function definition. I need to keep them the same.
If there are calculations you’ve done to do something useful and you need help expressing those in Python, it would be useful to see those calculations.
At this point, I’m afraid this just sounds like some sort of fantasy.
Then, would you be referring to default values for parameters, such as references to function definitions? We do seem to have departed from the original topic of this discussion, so maybe a new discussion is needed to accommodate the topic of importing definitions.
It now appears that when you initiated this discussion, perhaps you had some broad societal questions in mind. This forum, however, focuses on Python, so you may need another forum for addressing the broad questions.