Raymond Hettinger rhettin...@users.sourceforge.net added the comment:
Am rejecting this request because it complicates pprint and makes it harder to
extend. Most use cases of pprint either don't need this or have output
requirements more complicated than proposed (i.e. adding fixed width
Changes by Terry J. Reedy tjre...@udel.edu:
--
stage: - unit test needed
versions: +Python 3.2 -Python 2.6
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue8228
___
Amaury Forgeot d'Arc amaur...@gmail.com added the comment:
Please generate patches with context diff, or better unified diff, with the
diff -u command.
I've done it, before the source code changes and the patch becomes impossible
to apply.
Note that the new version does not respect the width:
Dmitry Chichkov dchich...@gmail.com added the comment:
Yes. This patch is nowhere near the production level. Unfortunately it works
for me. And in the moment I don't have time to improve it further. Current
version doesn't check the item's width upfront, there is definitely room for
New submission from Dmitry Chichkov dchich...@gmail.com:
I've run into a case where pprint isn't really pretty.
import pprint
pprint.PrettyPrinter().pprint([1]*100)
Prints a lengthy column of '1'; Not pretty at all. Look:
[1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
1,
Dmitry Chichkov dchich...@gmail.com added the comment:
Quick, dirty and utterly incorrect patch that works for me. Includes
issue_5131.patch (defaultdict support, etc). Targets trunk (2.6), revision
77310.
--
keywords: +patch
Added file: