Multiple inheritance for builtin classes doesn't work when it should
s-cork opened this issue · comments
Most of the time it shouldn't work
e.g. you can't just inherit from str
and dict
>>> class A(str, dict): pass
TypeError: multiple bases have instance lay-out conflict
But at the moment we tar all builtin classes with the same brush. Even when it should work.
Specifically for Errors classes
>>> class A(TypeError, ValueError): pass
TypeError: multiple bases have instance lay-out conflict
# This should be allowed - it is in cpython
We'd need to fix this before addressing #1341