[issue38262] Mixins - super calls in bases of multiple-inheritance with different parameters

Steven D'Aprano report at bugs.python.org
Tue Sep 24 07:42:08 EDT 2019


Steven D'Aprano <steve+python at pearwood.info> added the comment:

Are your tests so huge that you need to gzip them before uploading? That makes them extremely difficult to read from the browser, and makes me extremely suspicious that this could be some form of zip bomb or other malware. Couldn't you upload a single .py file instead a shell script?

You say that super() "cares about multiple inheritance as well
as mixins" and then say "It is obvious, that such a class has to comply to the parents call interface - here object - when to be used standalone."

I don't understand what you mean by "standalone" here, but to be clear, Python mixins are just regular classes. There is no difference between ordinary classes and mixin classes in Python, and they use the same multiple-inheritance method resolution order whether you think of them as "mixins" or "multiple inheritance".

You say: "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."

I am sorry, I cannot work out what you are saying here.

----------
nosy: +steven.daprano

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38262>
_______________________________________


More information about the Python-bugs-list mailing list