I've made a function that takes a function as an argument.
If I want to specify that a function takes an integer it's pretty easy:
def fun(myInt:int=0):
return myInt
But when it takes a function I can't do this:
def fun(myFun:function=print):
myFun('whatever')
I printed type() of both an integer and a function and got
<class 'int'>
<class 'function'>
What is the difference between these two and is an easy way to do what I wanted to do?
Btw. I've already used fellow google and couldn't find anything