[Tutor] How to get all methods of "object"?

boB Stepp robertvstepp at gmail.com
Sat Sep 21 19:29:16 EDT 2019


Python 3.7.4

I tried to do this with:

>>> for attribute in dir(object):
    print(attribute)


__class__
__delattr__
__dir__
__doc__
__eq__
__format__
__ge__
__getattribute__
__gt__
__hash__
__init__
__init_subclass__
__le__
__lt__
__ne__
__new__
__reduce__
__reduce_ex__
__repr__
__setattr__
__sizeof__
__str__
__subclasshook__

But I know at least one that is not listed:  __dict__  And I would not
be surprised if there are others.

Basically, I am wondering what are *all* the things inherited from
"object" when one creates one's own class?

I am currently trying to find such a list in the Python 3 docs, but so
far I have been unsuccessful.

-- 
boB


More information about the Tutor mailing list