[issue19103] Use pprint in displayhook

Serhiy Storchaka report at bugs.python.org
Sun Sep 29 22:22:18 CEST 2013


Serhiy Storchaka added the comment:

> (in the patch, import of sys and pprint should be done once at module level and not repeated with every line of interactive output).

See a comment at the start of the Lib/_sitebuiltins.py file. Yes, importing sys in the function is redundant.

> For instance, try list(range(40)) with the two options.

Well, I have opened issue19132 for this.

> This is not to mention doctest and other test breakage.

AFAIK doctests doesn't test output longer than 80 characters.

> I believe the majority consensus on python-ideas was to reject this until pprint is much improved, and then reconsider.

There are other pprint-related issue which are opened long time without any progress (e.g. issue7434). I intend making progress on issues which are required for fixing pprint enough to be reasonable replacement for displayhook.

----------
dependencies: +Add compact mode to pprint

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19103>
_______________________________________


More information about the Python-bugs-list mailing list