'object' class documentation in python

Question:

I can’t find the documentation of the ‘object’ class in python, which is the root of the inheritance tree of all classes in python.
what I have tried: googling the terms shows pages and pages of results regarding object oriented programming in python.
where can I get the documentation?

Asked By: mayank mahajan

||

Answers:

Remember that object is a class, and like all other classes you can get two useful things.

  • help
  • dir

Try this:

>>> help(object) # Will give you some information about the methods implemented
>>> dir(object) # Will give you the attributes list

Do you want the exact source code?
Builtins.pyi

I think object was implemented at interpreter-level, but in the file builtins.pyi you can find something useful too.

Answered By: FLAK-ZOSO
Categories: questions Tags: , ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.