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

Eric V. Smith report at bugs.python.org
Mon Mar 19 04:57:06 EDT 2018


Eric V. Smith <eric at trueblade.com> added the comment:

This is the same reason that this fails:

class Base:
    __slots__ = ('x',)
    x = 3

with:
ValueError: 'x' in __slots__ conflicts with class variable

In the dataclasses case, the error needs to be improved, and moved to when the base class is being defined.

----------

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


More information about the Python-bugs-list mailing list