PEP 813: The Pretty Print Protocol
PEP 813: The Pretty Print Protocol
@hugovk @peps interesting PEP! Very cool that this would just be a keyword argument to print.
This part is unfortunate (I really don't like the output format pprint uses for the built-in types):
> This also means that there’s no way to control the pretty printed format of built-in types like strings, dicts, lists, etc.

A couple of the elder statesmen are happy to announce PEP 813, a proposal to build-in optional pretty printing for print(), str.format(), and f-strings, and to define a protocol classes can implement to participate in and customize how their instances are pretty printed. Enjoy, and let the games begin!