
April 12, 2022
8:47 p.m.
On Wed, 13 Apr 2022 at 04:28, malmiteria <martin.milon@ensc.fr> wrote:
Idk, what do you think?
I would need to see more examples to determine the limit of the current strategy for method resolution and super. For the example at hand, I can be happy with the following code as a lib user (using your lib code). ``` class Proud_base(HighGobelin): scream = HighGobelin.scream class ProudGobelin_floating(ProudGobelin, Proud_base): pass class HalfBreed(ProudGobelin_floating, CorrupteGobelin): def scream(self): if random.choices([True, False]): super(HalfBreed, self).scream() else: super(Proud_base, self).scream() ``` Best regards, Takuo