[issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters
Raymond Hettinger
report at bugs.python.org
Tue Sep 24 21:29:27 EDT 2019
Raymond Hettinger <raymond.hettinger at gmail.com> added the comment:
> The oddity I came around is the simple case of mixins with
> different parameters, where both are derived from 'object'.
> It is obvious, that such a class has to comply to the parents
> call interface - here object - when to be used standalone. BUT when
> I ignore this and set intentionally a parameter - for test-purposes
> of mixins only - the resolution algorithm seems to normalize both for the
> final call without parameters - as soon as one of the mixins is a
> non-parameter call. This is independent from the inheritance order
> for the derived class.
Sorry, this isn't a bug. In may be inconvenient but it is intrinsic to how cooperative multiple inheritance works.
FWIW, the techniques for managing parameter passing are covered in this blog post: https://rhettinger.wordpress.com/2011/05/26/super-considered-super/
----------
nosy: +rhettinger
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38262>
_______________________________________
More information about the Python-bugs-list
mailing list