Message219320
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. |
|
Date |
User |
Action |
Args |
2014-05-28 22:57:52 | gvanrossum | set | recipients:
+ gvanrossum, georg.brandl, rhettinger, terry.reedy, gregory.p.smith, jcea, jaraco, Rhamphoryncus, blakeross, benjamin.peterson, KayEss, jonash, eric.snow |
2014-05-28 22:57:52 | gvanrossum | set | messageid: <1401317872.06.0.391759759804.issue1683368@psf.upfronthosting.co.za> |
2014-05-28 22:57:52 | gvanrossum | link | issue1683368 messages |
2014-05-28 22:57:51 | gvanrossum | create | |
|