[issue39145] Innocuous parent class changes multiple inheritance MRO

Cyker Way report at bugs.python.org
Fri Dec 27 21:21:57 EST 2019


New submission from Cyker Way <cykerway at gmail.com>:

With an inheritance graph like this:

        A       C
        B       D      (X)      A
                E

Adding or removing class X in E's parents will change the order of A and C in E's MRO: EBDAC vs EBDCXA.

I couldn't imagine what would be the "perfect" MRO. However, given X is completely independent from A and C, this behavior looks strange and problematic.

----------
components: Interpreter Core
files: mro.py
messages: 358921
nosy: cykerway
priority: normal
severity: normal
status: open
title: Innocuous parent class changes multiple inheritance MRO
type: behavior
versions: Python 3.8
Added file: https://bugs.python.org/file48804/mro.py

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39145>
_______________________________________


More information about the Python-bugs-list mailing list