This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rhettinger
Recipients LewisGaul, eric.smith, eric.snow, rhettinger, serhiy.storchaka
Date 2021-01-31.18:15:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1612116907.43.0.500626987843.issue43080@roundup.psfhosted.org>
In-reply-to
Content
At some point, we need a modern redesign alternative to pprint.  It could have its own __pprint__ method to communicate how it wants to be pretty printed.

Until then, I think the existing pprint module should only grow custom support for classes that have a mostly consistent structure and usage pattern.  SimpleNamespace, for example, made sense for a custom pprint handler because it is so dict like and is almost never customized.

IMO, dataclasses are a bridge too far.  Having pprint() guess what a dataclass intends is not far from try to guess what an arbitrary class intends.  This is skating on thin ice.
History
Date User Action Args
2021-01-31 18:15:07rhettingersetrecipients: + rhettinger, eric.smith, eric.snow, serhiy.storchaka, LewisGaul
2021-01-31 18:15:07rhettingersetmessageid: <1612116907.43.0.500626987843.issue43080@roundup.psfhosted.org>
2021-01-31 18:15:07rhettingerlinkissue43080 messages
2021-01-31 18:15:07rhettingercreate