Message303121
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. |
|
Date |
User |
Action |
Args |
2017-09-27 10:06:13 | ncoghlan | set | recipients:
+ ncoghlan, eric.snow, serhiy.storchaka, Oren Milman |
2017-09-27 10:06:13 | ncoghlan | set | messageid: <1506506773.54.0.154975027568.issue31588@psf.upfronthosting.co.za> |
2017-09-27 10:06:13 | ncoghlan | link | issue31588 messages |
2017-09-27 10:06:13 | ncoghlan | create | |
|