A philosophical problem with this is proposal is that it takes a notation that is processed by the bytecode compiler and makes it dependent on user code to be imported from the stdlib. We only do that in rare cases — IIRC the only other case is ‘import’ calling ‘__import__()’. This reversal of dependency is problematic because it means that core, built-in functionality could be broken by something a user could inadvertently change in the file system.

Another problem I have is that pprint is kind of a second-class citizen. It’s not all that much cared for by core devs I believe, and you can’t extend it by adding a special method to a class — you have to subclass the PrettyPrinter class.

All in all I don’t think this is a direction we should take.

— Guido
--
--Guido (mobile)