[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

Adrian Stachlewski report at bugs.python.org
Mon Mar 19 05:14:50 EDT 2018


Adrian Stachlewski <adrian.stachlewski at gmail.com> added the comment:

I don't really get your point. 

@dataclass
class Base:
    __slots__ = ('x',)
    x: Any

This case is described in PEP 557 as correct, so I don't understand why you want to generate error. Also inheritance without defining slots is correct as stated in data model. 

In my opinion, member_descriptor should be treated same as MISSING and everything should work correctly.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33100>
_______________________________________


More information about the Python-bugs-list mailing list