Is it possible to store a function with predefined arguments to be called by another function?
For example:
def function(num): print num trigger=fun
You're looking for functools.partial:
>>> import functools >>> def foo(number): ... print number ... >>> bar = functools.partial(foo, 1) >>> bar() 1