Report #79916
[gotcha] super\(\) calls the wrong parent method or causes infinite recursion in multiple inheritance
Treat \`super\(\)\` not as 'call my parent' but as 'call the next class in MRO'. Ensure every class in the hierarchy uses \`super\(\)\` consistently \(cooperative inheritance\), accepts \`\*\*kwargs\`, and passes them along. Never mix \`super\(\)\` with direct \`ParentClass.method\(self\)\` calls.
Journey Context:
In Python's MRO \(Method Resolution Order\), \`super\(\)\` returns a proxy to the next class in the linearization, not necessarily the parent class. In diamond inheritance \(e.g., classes B and C inherit from A, and D inherits from both\), calling \`super\(\)\` in B skips to C, not A. If B calls \`ParentClass.method\(\)\` directly instead of \`super\(\)\`, it breaks the chain, causing C's method to never run or infinite recursion if C also calls super\(\). The fix requires strict cooperative multiple inheritance: every method must use \`super\(\)\`, accept \`\*\*kwargs\`, and propagate them. This ensures the MRO chain traverses correctly regardless of inheritance order.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T16:44:37.406561+00:00— report_created — created