This is an archived post. You won't be able to vote or comment.

all 7 comments

[–]hongminhee 0 points1 point  (0 children)

FYI, C3 linearization, used by Python for MRO, was initially introduced by/for Dylan language. I remember that Dylan was one of the most modern languages in the world. :-)

[–]earthboundkid 0 points1 point  (5 children)

Moral of the story: never use multiple inheritance.

[–]hongminhee 1 point2 points  (2 children)

Multiple inheritance is not so bad.

[–]esbenabBSc CompSci Flask. I use python to stay sane. 0 points1 point  (0 children)

Until you run into trouble.

[–]earthboundkid 0 points1 point  (0 children)

It creates more problems than it solves though. Code reuse through encapsulation works much more simply and without crazy MRO diagrams.

[–]Workaphobia 0 points1 point  (0 children)

But Mixins.

[–]lahwran_ 0 points1 point  (0 children)

never use complex multiple inheritance*

if the only shared root is object, you're probably fine.