
On 15/04/22 10:37 pm, Steven D'Aprano wrote:
If you look at languages that implement MI, and pick the implementations which allow it with the fewest restrictions, then that is "full MI".
I believe that Python (and other languages) allow MI with the smallest set of restrictions, namely that there is a C3 linearization possible
But before Python adopted the C3 algorithm, it was less restrictive about the inheritance graph. So by your definition, current Python does not do full MI!
If you have to manually call a specific method, as shown here:
https://devblogs.microsoft.com/oldnewthing/20210813-05/?p=105554
you're no longer using inheritance, you're doing delegation.
You could also say that Python automatically delegates to the first method found by searching the MRO. Why is one of these delegation and not the other? -- Greg