[issue46382] dataclass(slots=True) does not account for slots in base classes

Eric V. Smith report at bugs.python.org
Thu Mar 17 07:53:54 EDT 2022


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

Serhiy: Could you point to some documentation on __slotnames__? I see a few references in the code to it, but it's not set on simple test class.

>>> class A:
...     __slots__=('a',)
...
>>> A.__slotnames__
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: type object 'A' has no attribute '__slotnames__'. Did you mean: '__slots__'?
>>>

----------

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


More information about the Python-bugs-list mailing list