
On Mon, 4 Apr 2022 at 07:16, malmiteria <martin.milon@ensc.fr> wrote:
You haven't demonstrated that there's a problem to be solved. The problem called "diamond problem" is a classic of multiple inheritance, an exemple here that was already posted on this thread : https://stackoverflow.com/questions/55829798/c-diamond-problem-how-to-call-b.... When a class appear multiple time in an inheritance tree, should call to this class methods occur multiple times? In case the class appearing multiple time does commits to a database, we don't want multiple calls. In case such as the exemple i described in my lengthy post, we do want all those calls. I propose a decorator / attribute that would allow users to define the strategy they want.
It's a very real problem in C++, because C++ has a completely different concept of multiple inheritance. You're linking to a C++ thread that is solving a C++ problem in a C++ way. Python's fundamental model is very different, its problems are different, and its solutions are different. ChrisA