[issue46693] dataclass generated __str__ does not use overridden member __str__

Eric V. Smith report at bugs.python.org
Wed Feb 9 12:20:43 EST 2022


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

I believe dataclasses uses repr() of the members, not str(). Can you try using specifying __repr__ in Teacup? Just __repr__ = __str__ should work.

----------
nosy: +eric.smith

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


More information about the Python-bugs-list mailing list