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

2022-02-09 Thread Eric V. Smith
Eric V. Smith added the comment: I'll close it. -- resolution: -> not a bug stage: -> resolved status: open -> closed ___ Python tracker ___

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

2022-02-09 Thread Bruce Eckel
Bruce Eckel added the comment: Oops. That does in fact work. How do I remove the bug report? *Bruce Eckel* HappyPathProgramming.com SummerTechForum.com MindViewLLC.com Blog: BruceEckel.com EvolveWork.co WinterTechForum.com OnJava8.com

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

2022-02-09 Thread Eric V. Smith
Eric V. Smith 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

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

2022-02-09 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

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

2022-02-09 Thread Bruce Eckel
New submission from Bruce Eckel : When creating a dataclass using members of other classes that have overridden their __str__ methods, the __str__ method synthesized by the dataclass ignores the overridden __str__ methods in its component members. Demonstrated in attached file. --