Message52580
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 |
|
Date |
User |
Action |
Args |
2007-08-23 15:58:21 | admin | link | issue1713041 messages |
2007-08-23 15:58:21 | admin | create | |
|