[New-bugs-announce] [issue29996] Use terminal width by default in pprint

Serhiy Storchaka report at bugs.python.org
Wed Apr 5 12:29:16 EDT 2017


New submission from Serhiy Storchaka:

pprint() uses width=80 by default. But default output stream is sys.stdout which often is connected to a terminal, and terminals now usually have larger width than 80 columns.

Proposed patch change the default value of the width parameter in pprint(). If the width is specified and the output is a terminal, then the width of the terminal is used.

----------
components: Library (Lib)
messages: 291187
nosy: fdrake, rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Use terminal width by default in pprint
type: enhancement
versions: Python 3.7

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


More information about the New-bugs-announce mailing list