When I create a module with its sole content:
class Classname(randomobject):
pass
And I try to run the .py file of the module the interpreter says that randomobject
is not defined.
But when I do:
class Classname(object):
pass
The module runs just fine. So if object
is not a keyword, then what is it?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…