class Classname(object), what sort of word is 'object' in Python?

前端 未结 4 902
攒了一身酷
攒了一身酷 2020-12-14 06:18

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 inter

4条回答
  •  情歌与酒
    2020-12-14 06:27

    object is the base class from which you inherit when creating a new-style class in Python 2.

提交回复
热议问题