[issue6743] pprint.pprint should support no objects to print blank lines & allow args

Éric Araujo report at bugs.python.org
Fri Jul 15 18:00:09 CEST 2011


Éric Araujo <merwok at netwok.org> added the comment:

Here’s a first draft at a patch.  I’ve added a module-level print function and a PrettyPrinter.print method which does the real work.

The functions have a signature compatible with print, but I have changed one default value: sep defaults to ',\n', because I think that the output is more useful and more pleasing (otherwise you’d have strange-looking indentation with containers).

If this looks good, I’ll work on doc and tests.  I guess I’ll reuse the helpers in test_print.

----------
keywords: +patch
stage:  -> needs patch
Added file: http://bugs.python.org/file22667/pprint-print.diff

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


More information about the Python-bugs-list mailing list