Eric V. Smith <[email protected]> added the comment:
My point is that the problem is that after:
@dataclass
class Base:
__slots__ = ('x',)
x: Any
Base.x has a value (it's the member_descriptor for x). That's what's causing
the problem that when adding a field to the derived class, it thinks you're
adding a field without a default value after one that has a default value.
I agree that I could detect this specific case and allow it. My comment about
the error message was inaccurate.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue33100>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com