Reputation: 4900
I'm trying to find some more information about the Python base class: object
but can't find any. Is it just something like class object: pass
and doesn't deserve any more attention or...?
Where can I find more about it. What do other classes inherit from it?
Upvotes: 2
Views: 236
Reputation: 214949
Some basic stuff for other objects to use.
>>> dir(object())
['__class__', '__delattr__', '__doc__', '__format__', '__getattribute__',
'__hash__', '__init__', '__new__', '__reduce__', '__reduce_ex__', '__repr__',
'__setattr__', '__sizeof__', '__str__', '__subclasshook__']
For more info of what these methods are for check http://docs.python.org/reference/datamodel.html, and here's how they are implemented http://hg.python.org/cpython/file/3d4d52e47431/Objects/object.c.
Upvotes: 2
Reputation: 273386
There's some good info here (and in other articles linked from there). Here's the diagram:
Upvotes: 3