En Thu, 05 Apr 2007 18:13:06 -0300, Martin Manns <[EMAIL PROTECTED]> escribió:
> On Thu, 5 Apr 2007 16:55:38 -0400 > "John Clark" <[EMAIL PROTECTED]> wrote: >> Because the MRO isn't just a depth first traversal, the term "first >> grandparent" gets tricky to define... > > Not really. The first grandparent would be the first occurrence in the > list from left to right, which satisfies the requirement that its > shortest path to the current class is 2. > The only problem: How do I get it? Calling super() twice? F.mro()[1]? But really I don't think it's a good idea - depending on the *other* classes in your hierarchy, what you call "grandparent" may be almost anyone. If you *have* to bypass your parent, it feels like there is something wrong in the class hierarchy. -- Gabriel Genellina -- http://mail.python.org/mailman/listinfo/python-list