4 ms·
tl;dr Just looks like super/parent like in other languages. Did i miss something from not reading this?
by kalelias 15y ago
tl;dr
Just looks like super/parent like in other languages. Did i miss something from not reading this?
- masklinn 15y ago> Did i miss something from not reading this? Everything? Mostly the part where, Python being an MI language, a given class A has multiple parents. And these parents are a sequence, not a set, which define a Method Resolution Order, and that method resolution order usually isn't breadth-first either, so Python's super is a graph walker. And because it's explicit, any node in the graph can stop the walking. This means permuting two parent classes can have significant impact on the semantics of the graph walking, therefore the results of calling super.
- kalelias 15y agoThanks for the short explanation. I totally forget about python being MI.
- pdubroy 15y agoYes.
- Peristarkawan 15y agoYes, Python's super is more like Dylan's next-method than, say, C#'s super.
- silentbicycle 15y agoSome small steps in the direction of a meta-object protocol: more fine-grained control over call dispatch in a multiply-inheriting class hierarchy.
- smosher 15y agoYou didn't miss as much as others seem to think. Nothing here changes the fact that it subverts the object model and overuse causes kudzu.
- kalelias 15y agoYeah, OO is too hard.