In the python docs it says:
Objects are Python’s abstraction for data. All data in a Python program is represented by objects or by relations between objects.
If you start the Python interpreter and type
>>> id(object)
4563621280
it will print an integer that represents its identity, if you do the same thing with another reference name that is not defined, you will get an error
>>> id(x)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
NameError: name 'x' is not defined
So by default "object" is defined while "x" is not.
But if we define now the "x" object and try again
x = 1
id(x)
4564531496
it will print an integer. Now when you check that the "x" object is an instance of "object" object:
>>> isinstance(x, object)
True
It will print "True". The same for any object, they will be instances of object "object". And if you check the type, you will find that it is a class instance.
>>> type(x)
<class 'int'>
if we check the class 'int' attributes with the builtin function dir it will print
>>> dir(int)
['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_count', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
>>> dir(x)
['__abs__', '__add__', '__and__', '__bool__', '__ceil__', '__class__', '__delattr__', '__dir__', '__divmod__', '__doc__', '__eq__', '__float__', '__floor__', '__floordiv__', '__format__', '__ge__', '__getattribute__', '__getnewargs__', '__getstate__', '__gt__', '__hash__', '__index__', '__init__', '__init_subclass__', '__int__', '__invert__', '__le__', '__lshift__', '__lt__', '__mod__', '__mul__', '__ne__', '__neg__', '__new__', '__or__', '__pos__', '__pow__', '__radd__', '__rand__', '__rdivmod__', '__reduce__', '__reduce_ex__', '__repr__', '__rfloordiv__', '__rlshift__', '__rmod__', '__rmul__', '__ror__', '__round__', '__rpow__', '__rrshift__', '__rshift__', '__rsub__', '__rtruediv__', '__rxor__', '__setattr__', '__sizeof__', '__str__', '__sub__', '__subclasshook__', '__truediv__', '__trunc__', '__xor__', 'as_integer_ratio', 'bit_count', 'bit_length', 'conjugate', 'denominator', 'from_bytes', 'imag', 'numerator', 'real', 'to_bytes']
When you define a class, by default the "object" class is passed to your class so you can inherit from it, for example:
class A:
pass
is the same as
class A(object):
pass
>>> class A:
... pass
...
>>> A.__mro__
(<class '__main__.A'>, <class 'object'>)
>>> class A(object):
... pass
...
>>> A.__mro__
(<class '__main__.A'>, <class 'object'>)
So, in general, every thing in Python including numbers, strings, etc. They are classes that inherit from the base class "object" which is defined by default at the begining.
object is a base for all classes. It has methods that are common to all instances of Python classes.
Even functions are instances of the class Callable that inherits from the "object" class above. That is one of the reasons why everything in python is considered an object, because you can use all of them as a normal data types that can be stored in a list or passed like arguments to a function and so on. All of this should be correct for Python3.x; in Python2.x classes does not inherit from class "object" by default.
A lot of output, but I hope this will clear a few points, correct me if I have any mistakes. I would also leave this link to pycon video, it is for Michael Foord, I found it useful.