This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nnorwitz
Recipients
Date 2007-05-09.06:56:12
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
I notice in the doc an example which doesn't work with this patch.  It still prints one level too deep.  The doc seems correct to me, but I don't have strong feelings any way.  The attached patch makes the doc example work as expected.  The doc should really be updated with an example more like:

>>> pp = pprint.PrettyPrinter(depth=6)
>>> pp.pprint((1, (2, (3, (4, (5, (6, 7)))))))
(1, (2, (3, (4, (5, (...))))))
>>> pp = pprint.PrettyPrinter(depth=1)
>>> pp.pprint(1)
1
>>> pp.pprint([1])
[...]

The updated patch causes the new tests to fail.  Could you update the test/code/doc to all be consistent?
File Added: pp2.diff
History
Date User Action Args
2007-08-23 15:58:21adminlinkissue1713041 messages
2007-08-23 15:58:21admincreate