I believe I understand the barebone mechanics on how to do this. But I do not understand the rationale of why Python does it the way it does. Say
def f(g, *args): g(*args) def g(*args): # Do something. do_things = f(g, *args) is the outline of how I understand the mechanics of doing this. But noob boB initially want to do instead: def f(g(*args)): g(*args) def g(*args): # Do somenthing. do_things = f(g(*args)) which, of course, will give me a syntax error. Also, I note that if I just type a function name without the parentheses in the interpreter, I will get something like this: >>> def f(): pass >>> f <function f at 0x000001F775A97B70> So the impression I am getting is that a function name by itself (with no parentheses) is the function *object*. But why does Python require separating the function object from its parameters when it is being passed as an argument to another function? -- boB _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor