Python2とPython3の継承、違い

Python2

>>> class ParentClass(object):
...     def foo(self):
...         print "call parent"
...
>>> class ChildClass(ParentClass):
...     def foo(self):
...         super(ChildClass, self).foo()
...         print "call child"
...
>>> p = ParentClass()
>>> c = ChildClass()
>>> p.foo()
call parent
>>> c.foo()
call parent
call child

Python3

>>> class ParentClass(object):
...     def foo(self):
...         print("call parent")
...
>>> class ChildClass(ParentClass):
...     def foo(self):
...         super().foo()  # super()だけで良い。シンプル
...         print("call child")
...
>>> p = ParentClass()
>>> c = ChildClass()
>>> p.foo()
call parent
>>> c.foo()
call parent
call child