New submission from ppperry <maprea...@olum.org>:
I was trying to create a class that didn't have any references to itself to test issue39382 and ran the following code: class Meta(type): def mro(cls): return type.mro(cls)[1:] class X(metaclass=Meta): pass This produced an extremely cryptic error message: Traceback (most recent call last): File "<pyshell#89>", line 1, in <module> class X(metaclass=Meta): TypeError: super(type, obj): obj must be an instance or subtype of type While what I am trying to do may well not be supported, the error message referencing the `super` function, which I didn't use, is not helpful. ---------- components: Build, Interpreter Core messages: 362152 nosy: ppperry priority: normal severity: normal status: open title: Cryptic error message when creating types that don't include themselves in their MRO type: behavior versions: Python 3.7, Python 3.8 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39665> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com