Nick Coghlan <ncogh...@gmail.com> added the comment: There's no __prepare__ method in 2.7, so that version can't be affected by this.
For 3.6 and 3.7, I can't reproduce the reported SystemError. Instead, I get: ``` >>> class BadMetaclass(type): ... def __prepare__(*args): ... pass ... >>> class Foo(metaclass=BadMetaclass): ... pass ... Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 1, in Foo TypeError: 'NoneType' object is not subscriptable ``` The error remains the same if I add `@classmethod` to the __prepare__ definition. That's still thoroughly cryptic and worth changing, but indicates the test should be checking the error message details, not just the error type. ---------- versions: -Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue31588> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com