[issue8733] list type and UserList do not call super in __init__ and therefore, they cannot be parents in a multiple inheritence scheme

Sagiv Malihi report at bugs.python.org
Wed May 19 15:40:30 CEST 2010


Sagiv Malihi <sagivmalihi at gmail.com> added the comment:

Example:

class A(object):
 def __init__(self):
  print "initializing something very important"
  # and then pay it forward...
  super(A, self).__init__()

class B(list, A): pass

b = B()
# A's init is never called...

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue8733>
_______________________________________


More information about the Python-bugs-list mailing list