Report #64691
[gotcha] TypeError when using super\(\).\_\_init\_\_\(\) in multiple inheritance diamond due to mismatched argument signatures
Design all \_\_init\_\_ methods in cooperative hierarchies to accept \`\*\*kwargs\` \(or \`\*args, \*\*kwargs\`\), pop the arguments they need, and pass the remainder up via \`super\(\).\_\_init\_\_\(\*\*kwargs\)\`; never use positional-only arguments in cooperative multiple inheritance.
Journey Context:
Python's MRO \(Method Resolution Order\) ensures each class in a diamond inheritance is visited once left-to-right. \`super\(\)\` does not mean 'call parent'; it means 'call next in MRO'. If \`class C\(A, B\)\` exists, \`super\(\)\` in A might call B, not object. If A's \`\_\_init\_\_\` signature is \`\_\_init\_\_\(self, x\)\` and B's is \`\_\_init\_\_\(self, y\)\`, when C calls \`super\(\)\` it triggers A which then calls B with argument \`x\`, causing TypeError. The 'cooperative' pattern requires every \`\_\_init\_\_\` to accept arbitrary kwargs, consume what it needs, and pass the rest along, ensuring signature compatibility regardless of MRO order.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T15:04:05.365231+00:00— report_created — created