On Sat, Apr 23, 2022 at 10:18:05PM +0900, Stephen J. Turnbull wrote:
> malmiteria  writes:

>  > If O1 and O2 are refactored into N1(GP) and N2(GP)
>  > the MRO as it was before refactoring was essentially N1, GP, N2, GP,
>  > as what was O1 before refactoring is equivalent to N1, GP after
>  > refactoring. 
>  > After refactoring, the MRO is now N1, N2, GP. Which do behave
>  > differently, in general.
> 
> Nobody denies that.

I denied the first part, and still do.

There is no possible valid MRO that goes [N1, GP, N2, GP] because that 
lists the same class twice. Such a thing was possible in Python 1.x and 
2.x "old-style" (classic) classes, it was a bug in the way classic 
classes generated the MRO, and it caused bugs in code that hit those 
cases. 

(Fortunately those cases were rare, so most people didn't notice.)


-- 
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/UEGNMUD3P55W4C6SJ6IWGTZT7QFPRROU/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to