On Thu, 7 Apr 2022 at 15:41, Greg Ewing <[email protected]> wrote: > > 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. >
I'm curious when you would ever be subclassing something from another library without knowing its hierarchy. For instance, it's quite common to subclass a GTK object to create your own functionality (subclass Window to create MyApplicationWindow, subclass HButtonBox to create BoxOfMyButtons, etc), but the docs are very clear about what each class's hierarchy is - it's a vital part of the API. The idea that someone would MI two classes from the same library and not know that they inherit from the same thing is a little odd IMO. ChrisA _______________________________________________ Python-ideas mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/[email protected]/message/X4IJ4LBI4SGYSUACIG7YFOQI4GF37IWW/ Code of Conduct: http://python.org/psf/codeofconduct/
