I am using python 3, and am wondering what 'function' is.
For example, here I create a function a
and print its type.
def a():
pass
print(type(a))
I get <class 'function'>
.
When I try to use the type function
, however, I get a NameError
.
Here is an example:
function
or
fplaceholder=function
both give me a NameError
, saying function
is not defined.
What exactly is function
, then?