Message388794
| Author |
eric.smith |
| Recipients |
LewisGaul, eric.smith, eric.snow, rhettinger, serhiy.storchaka |
| Date |
2021年03月16日.00:41:28 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1615855288.64.0.754417101387.issue43080@roundup.psfhosted.org> |
| In-reply-to |
| Content |
I'm leaning toward accepting this on the condition that it only be invoked for dataclasses where __repr__ was the version generated by @dataclass. And also that it use the same fields that the generated __repr__ would use (basically skipping repr=False fields). Under those conditions, I don't see the harm.
The reason I'm leaning toward acceptance is that we've talked about a better pprint for ages, and yet there's no activity that I can tell toward developing a replacement in the stdlib. pprint was a motivating example for PEP 443 (singledispatch), and that was accepted 8 years ago. I don't think we should have to wait forever to get better pprint for dataclasses.
But I'm still not 100% decided, and I can be reasoned with! |
|