Alex Waygood <alex.wayg...@gmail.com> added the comment:
This looks to be due to the fact that `slots=True` leads to the creation of an entirely new class (see line 1102), meaning that in the `super(cls, self)` calls in lines 611 and 618 (in the `_frozen_get_del_attr` function, responsible for generating `__setattr__` and `__delattr__` methods), `self` is no longer an instance of `cls`. I believe this can be fixed by tweaking `_frozen_get_del_attr` so that `cls` in the generated `__setattr__` and `__delattr__` methods is dynamically computed (`cls = type(self)`), rather than read from a closure, as is currently the case. ---------- components: +Library (Lib) nosy: +AlexWaygood _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45897> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com