Message390851
When
```
TypeError: __weakref__ slot disallowed: either we already got one, or __itemsize__ != 0
```
is raised, the second condition `base->tp_itemsize != 0` (i.e. the base is a *variable-length* type, like `int`, `tuple` and `bytes`) in the error message is impossible since using a non-empty `__slots__` (e.g. `__slots__ = ('__weakref__',)`) for a subtype of a variable-length type raises a
```
TypeError: nonempty __slots__ not supported for subtype of '…'
```
earlier in the `type.__new__` implementation. |
|
Date |
User |
Action |
Args |
2021-04-12 13:55:17 | maggyero | set | recipients:
+ maggyero |
2021-04-12 13:55:17 | maggyero | set | messageid: <1618235717.97.0.321047672472.issue43814@roundup.psfhosted.org> |
2021-04-12 13:55:17 | maggyero | link | issue43814 messages |
2021-04-12 13:55:17 | maggyero | create | |
|