In Python 2, classes must be explicitly defined as subclasses of an object. In Python 3, this will be the default.
>>> class A(object):
pass
>>> class B():
pass
>>> type(B)
<type 'classobj'>
>>> type(A)
<type 'type'>
I am using Python 2.7 and, as I know, in 2.7 classinherits from object.
user2623906
source
share