[issue5131] pprint doesn't know how to print a defaultdict
Terry J. Reedy
report at bugs.python.org
Wed Sep 29 19:30:54 CEST 2010
Terry J. Reedy <tjreedy at udel.edu> added the comment:
>IMHO pprint should be able to make a decent job of all the built in types
Agreed, already true as far as I know, and irrelevant. This issue is not about built-in types in the builtins module, as documented Lib Ref chapter 5 *Built-in Types*. Collections is an Python-coded stdlib module that happens to import a couple of its classes from _collections, written in C for speed.
I agree with Raymond that pprint needs a generic solution better than special-casing one class after another. Your idea of using ABCs intriguing.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5131>
_______________________________________
More information about the Python-bugs-list
mailing list