Guido van Rossum added the comment:

Hrm. I've always thought that the key point of cooperative MI was the term 
*cooperative*. Consider a regular (non-constructor) method. You must have a 
common base class that defines this method, and *that* method shouldn't be 
calling the super-method (because there isn't one). All cooperative classes 
extending this method must derive from that base class.

It's the same for __init__ and __new__, except that you may treat each 
(keyword) argument as a separate method. But you must still have a point in the 
tree to "eat" that argument, and that point must not pass it up the super call 
chain.

If in a particular framework you want unrecognized keyword arguments to the 
constructor to be ignored, you should define a common base class from which all 
your cooperative subclasses inherit. But given the prevalence of *single* 
inheritance, 'object' shouldn't be that common base class.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue1683368>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to