classification
Title: list type and UserList do not call super in __init__ and therefore, they cannot be parents in a multiple inheritence scheme
Type: behavior Stage:
Components: Extension Modules Versions: Python 3.3
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Sagiv.Malihi, alonho, benjamin.peterson, durban
Priority: normal Keywords:

Created on 2010-05-16 16:48 by alonho, last changed 2010-07-25 17:22 by durban.

Messages (2)
msg106047 - (view) Author: Benjamin Peterson (benjamin.peterson) * (Python committer) Date: 2010-05-19 11:47
Why does it matter? They both inherit from object, so there's no one to pass parameters to.
msg106070 - (view) Author: Sagiv Malihi (Sagiv.Malihi) Date: 2010-05-19 13:40
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...
History
Date User Action Args
2010-07-25 17:22:42durbansetnosy: + durban
2010-05-19 13:40:29Sagiv.Malihisetmessages: + msg106070
2010-05-19 11:47:22benjamin.petersonsetnosy: + benjamin.peterson
messages: + msg106047
2010-05-17 08:58:29Sagiv.Malihisetnosy: + Sagiv.Malihi
2010-05-16 16:48:56alonhocreate