On Sat, Mar 26, 2022 at 05:49:41PM -0000, malmiteria wrote: > Also, Eventual hierarchy where the rule won't fit are simply not > allowed today, no matter your use of super. > take this one for example : > ``` > class A(X, Y): pass > class B(Y, X): pass > class C(A, B): pass > ```
Because that is an inconsistent hierarchy, which makes the code broken, and leads to bugs. Both Python 1.x "classic classes" and Python 2.2 new-style classes allowed that, even though it is broken. However it is not *obviously* broken. Your classes need methods that actually do some work to see the breakage. See https://www.python.org/download/releases/2.3/mro/ for details. -- Steve _______________________________________________ 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/PVVTR4Z2A4ORYC33X4GKREYITFZNLDTI/ Code of Conduct: http://python.org/psf/codeofconduct/