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

2020-11-21 Thread Raymond Hettinger


Raymond Hettinger  added the comment:

There will always be classes that don't call super() init, sometimes for 
efficiency and sometimes to preserve their internal invariants.

Also, __init__() isn't the only method affected.  For a perfectly cooperative 
class, all of the methods would need to call super().

See how to handle this in the "How to Incorporate a Non-cooperative Class" 
section of: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/

--
nosy: +rhettinger
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2020-11-21 Thread Irit Katriel


Change by Irit Katriel :


--
versions: +Python 3.10, Python 3.9 -Python 3.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2014-01-31 Thread Yury Selivanov

Changes by Yury Selivanov yselivanov...@gmail.com:


--
versions: +Python 3.5 -Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-07-25 Thread Daniel Urban

Changes by Daniel Urban urban.dani...@gmail.com:


--
nosy: +durban

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-19 Thread Benjamin Peterson

New submission from Benjamin Peterson benja...@python.org:

Why does it matter? They both inherit from object, so there's no one to pass 
parameters to.

--
nosy: +benjamin.peterson

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-19 Thread Sagiv Malihi

Sagiv Malihi sagivmal...@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 rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-17 Thread Sagiv Malihi

Changes by Sagiv Malihi sagivmal...@gmail.com:


--
nosy: +Sagiv.Malihi

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



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

2010-05-16 Thread alon horev

Changes by alon horev alo...@gmail.com:


--
components: Extension Modules
nosy: alonho
priority: normal
severity: normal
status: open
title: list type and UserList do not call super in __init__ and therefore, they 
cannot be parents in a multiple inheritence scheme
type: behavior
versions: Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8733
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com