For your particular case of a diamond, the solution below seems
simpler to me than yours.  What problems may it create which your
solution won't?  Or you might refine the problem.  It's not easy to
see the real value of your suggestions.

```
class HighGobelin:
    def scream(self):
        self._speak()
        print("raAaaaAar")
    def _speak(self):
        return

class CorruptedGobelin(HighGobelin):
    def _speak(self):
        print("my corrupted soul makes me wanna scream")

class ProudGobelin(HighGobelin):
    def _speak(self):
        print("I ... can't ... contain my scream!")

class HalfBreed(ProudGobelin, CorruptedGobelin):
    @property
    def _speak(self):
        return super(
            __class__ if random.choices([True, False])
            else ProudGobelin,
            self
        )._speak
```

Best regards,
Takuo Matsuoka
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/JNZEO3PWUG225OBOSKRMPHEYEYAXDUXC/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to