Do you mean this?
def perform(fun, *args):
fun(*args)
def action1(args):
# something
def action2(args):
# something
perform(action1)
perform(action2, p)
perform(action3, p, r)
More Related Contents:
- Python – Class.function().function()
- Function to return results in a dictionary in Python
- Why does this recursion return 0?
- Why is the output of my function printing out “None”?
- How to get the original variable name of variable passed to a function
- UnboundLocalError with nested function scopes
- Why does using `arg=None` fix Python’s mutable default argument issue?
- unpacking function argument [duplicate]
- Is there an easy way to pickle a python function (or otherwise serialize its code)?
- Doing something before program exit
- What is the naming convention in Python for variable and function?
- Difference between methods and functions, in Python compared to C++
- How do I call a function from another .py file?
- Python function as a function argument?
- Overloaded functions in Python
- How to apply a function on every row on a dataframe?
- Setting variables with exec inside a function
- How can I make a deepcopy of a function in Python?
- Function chaining in Python
- Efficient evaluation of a function at every cell of a NumPy array
- Why should functions always return the same type?
- In Python, what does ” mean?
- break and continue in function
- Python functions with multiple parameter brackets
- How to make function decorators and chain them together in Python?
- I have a string whose content is a function name, how to refer to the corresponding function in Python?
- Check if all values in list are greater than a certain number
- Possible to change a function’s repr in python?
- numpy.r_ is not a function. What is it?
- Modify global list inside a function