2

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?

4
  • 2
    docs.python.org/3/library/… Commented Aug 18, 2022 at 21:03
  • 5
    You can also get a list of attributes with help(object). Commented Aug 18, 2022 at 21:05
  • 1
    @Jesper Did you read it? It doesn't say much about the class, like the methods it implements. Commented Aug 18, 2022 at 21:05
  • try: dir(object) Commented Aug 18, 2022 at 21:09

2 Answers 2

1

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.

Sign up to request clarification or add additional context in comments.

1 Comment

thanks, and i can get the exact implementation of it's methods by googling them directly right @FLAK-ZOSO?
0

This gives more documentation for each of the methods

Basic customization

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.