You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Python generally supports multiple inheritance, but only under certain conditions (the classes must have compatible memory layouts, compatible metaclasses, and a compatible MRO). This behavior is quite stable in practice but the documentation doesn't discuss it very much:
Python generally supports multiple inheritance, but only under certain conditions (the classes must have compatible memory layouts, compatible metaclasses, and a compatible MRO). This behavior is quite stable in practice but the documentation doesn't discuss it very much:
I propose to add a section to the language reference (not the tutorial) about multiple inheritance, explaining how it works and when it doesn't.
Relatedly, I just posted a proposal to allow type checkers to better support this: https://discuss.python.org/t/solid-bases-for-detecting-incompatible-base-classes/99280
Linked PRs