This is an old-style class:
class OldStyle:
pass
This is a new-style class:
class NewStyle(object):
pass
This is also a new-style class:
class NewStyle2:
__metaclass__ = type
Is there any difference whatsoever between NewStyle
and NewStyle2
?
I have the impression that the only effect of inheriting from object
is actually to define the type
metaclass, but I cannot find any confirmation of that, other than that I do not see any difference.