Closed
Description
Repro:
>>> class My[X](object): ...
...
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 1, in <generic parameters of My>
TypeError: Cannot create a consistent method resolution
order (MRO) for bases object, Generic
Notice that there's a \n
between "resolution" and "order".
This code exists for 21 years now: https://github.com/python/cpython/blame/main/Objects/typeobject.c#L2447
And it does not look anyone else is bothered :)
For me, TypeError: Cannot create a consistent method resolution order (MRO) for bases object, Generic
would be a much better error message.
Opinions?