On Mon, 4 Apr 2022 at 07:16, malmiteria <martin.mi...@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-base-method-only-once. > 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 _______________________________________________ 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/X45R5GGJMCVY4WE46CI5XORVP4UM2ASB/ Code of Conduct: http://python.org/psf/codeofconduct/