>>> class Hello:
pass
and
>>> isinstance(Hello,object)
True
>>> issubclass(Hello,object)
False
>
It's because you are using old-style classes so it doesn't derive from object
. Try this instead:
class Hello(object):
pass
>>> issubclass(Hello,object)
True
Old-style classes are deprecated and you shouldn't use them any more.
In Python 3.x all classes are new-style and writing (object)
is no longer required.