summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-12 16:26:52 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-12 16:26:52 (GMT)
commit23da6e654586bd59af566c6ed5d3e89bc55e8b23 (patch)
treee5e5f089a061e30920217a4f61f4e16827f372c2 /Doc/library
parent103f19d286d7b0a80bd83031d8fd1c0af31dfd9e (diff)
downloadcpython-23da6e654586bd59af566c6ed5d3e89bc55e8b23.zip
cpython-23da6e654586bd59af566c6ed5d3e89bc55e8b23.tar.gz
cpython-23da6e654586bd59af566c6ed5d3e89bc55e8b23.tar.bz2
#1713041: fix pprint's handling of maximum depth.
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/pprint.rst5
1 files changed, 2 insertions, 3 deletions
diff --git a/Doc/library/pprint.rst b/Doc/library/pprint.rst
index b3778f1..c0bedf5 100644
--- a/Doc/library/pprint.rst
+++ b/Doc/library/pprint.rst
@@ -66,8 +66,7 @@ The :mod:`pprint` module defines one class:
... ('parrot', ('fresh fruit',))))))))
>>> pp = pprint.PrettyPrinter(depth=6)
>>> pp.pprint(tup)
- ('spam',
- ('eggs', ('lumberjack', ('knights', ('ni', ('dead', ('parrot', (...,))))))))
+ ('spam', ('eggs', ('lumberjack', ('knights', ('ni', ('dead', (...)))))))
The :class:`PrettyPrinter` class supports several derivative functions:
@@ -220,7 +219,7 @@ This example demonstrates several uses of the :func:`pprint` function and its pa
['cccccccccccccccccccc', 'dddddddddddddddddddd']]
>>> pprint.pprint(stuff, depth=3)
['aaaaaaaaaa',
- ('spam', ('eggs', ('lumberjack', (...)))),
+ ('spam', ('eggs', (...))),
['aaaaaaaaaaaaaaaaaaaaaaaaaaaaaa', 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbb'],
['cccccccccccccccccccc', 'dddddddddddddddddddd']]
>>> pprint.pprint(stuff, width=60)