Re:Wield Python's super() like a Jedi
by masklinn on Thursday May 26, 2011 @01:48PM
(#2588700)
> 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.
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.