in python 3 every things are objs , functions too. functions are first-class citizens that mean we can do like other variables.
>>> class x:
pass
>>>
>>> isinstance(x,type)
True
>>> type(x)
<class 'type'>
>>>
>>> x=12
>>> isinstance(x,int)
True
>>> type(x)
<class 'int'>
>>>
but functions are diffrent ! :
>>> def x():
pass
>>> type(x)
<class 'function'>
>>> isinstance(x,function)
Traceback (most recent call last):
File "<pyshell#56>", line 1, in <module>
isinstance(x,function)
NameError: name 'function' is not defined
>>>
why error ? what is python functions type ?