
On 7/04/22 5:22 am, malmiteria wrote:
Also, i believe the idea of using anything but super to access a parent methods is far from obvious to most people.
That might be true for people who learned Python recently enough. When I started using Python, super didn't even exist, so I got used to thinking of Class.method as the *normal* way to call inherited methods. When super first appeared I saw it as something you only use when you particularly need it, i.e. when doing cooperative MI.
This alone justifies the idea that any newcomer to this kind of problem would try to use super, at least at first. And possibly wouldn't expect super targeting to behave like it does.
If I were teaching a newcomer about super, I wouldn't even tell them that it *has* a class argument. So they wouldn't have any expectation about targeting, because they wouldn't know about it.
if proudgobelin and corruptegobelin are published by a game_engine library, the game_engine user would most likely not be aware (nor should he care) that they both inherit from a same parent.
If someone is going to munge those classes together using MI, they'd better learn everything they possibly can about them. It's a delicate operation that requires knowing a *lot* about the classes you're blending together. In this case, the fact that both class names have the form <adjective>Gobelin would make me suspect quite strongly that they *do* have some common ancestry. -- Greg