So if I code:
a=False
print(type(a))
print(bool.mro())
The result is:
<class 'bool'>
[<class 'bool'>, <class 'int'>, <class 'object'>]
What works perfectly well in my point of view, although, if I run the following code I get an error:
def F():
pass
print(type(F))
print(function.mro())
The error:
<class 'function'>
NameError: name 'function' is not defined
how is " function" not defined since it says that is a class?
question from:
https://stackoverflow.com/questions/65876903/how-can-i-find-the-superclass-of-a-function-object-in-python 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…