On 1 March 2017 at 13:50, Steven D'Aprano <st...@pearwood.info> wrote: > It is possible that we could come up with a pretty-printing protocol, > but that wouldn't be a trivial job.
I'd be inclined to do this via simplegeneric. Let pprint do what it currently does, but allow users to register implementations for specific classes as they wish. I'm not sure how much work this would be - maybe a 3rd party "better pprint" module could prototype the approach to see if it's practical. Paul _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/