grandparent method with super

John Clark clajo04 at
Fri Apr 6 00:16:04 CEST 2007

> 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?

> Martin

I suppose you could do a 


(With the appropriate error handling buit in..) 

But I am not sure if it's a safe assumption to depend on __bases__ returning
the classes in the order you want...



More information about the Python-list mailing list