Steven D'Aprano <steve+pyt...@pearwood.info> added the comment:
Have you read the description of how the MRO is calculated? It's a standard algorithm. So long as the result matches the C3 linearisation algorithm, then it's not a bug. https://en.wikipedia.org/wiki/C3_linearization https://www.python.org/download/releases/2.3/mro/ I've gone back to Python 2.4 and tested the MRO. With and without class X, the MRO is: E B D C X A object E B D A C object so the result seems to be consistent back to 2.4 if not older. So it's not a change in behaviour in 3.8. It also matches the result of my own implementation of the C3 algorithm that I wrote some time ago to check my understanding of it. So it looks to me that this is the correct behaviour, going back to 2.3, so I'm closing it as "Not a bug". If you disagree, and can find a bug in Python's C3 linearisation algorithm, please feel free to reopen. If you disagree with the choice of the C3 algorithm, and want to suggest some other algorithm, you'll need to write a PEP setting forth the pros and cons of both, explaining why the alternative is better than the status quo. ---------- nosy: +steven.daprano resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39145> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com