[issue44649] dataclasses slots with init=False field raises AttributeException

Eric V. Smith report at bugs.python.org
Fri Jul 16 15:15:50 EDT 2021


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

I created issue 44655 for the confusing error message.

The problem with dataclasses is that the instance variable 'b' needs to be initialized, instead of the current dataclasses behavior where it relies on the class variable when reading 'b'.

----------

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


More information about the Python-bugs-list mailing list