Changeset 391 for python/trunk/Doc/library/pprint.rst
- Timestamp:
- Mar 19, 2014, 11:31:01 PM (11 years ago)
- Location:
- python/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
python/trunk
-
Property svn:mergeinfo
set to
/python/vendor/Python-2.7.6 merged eligible /python/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
python/trunk/Doc/library/pprint.rst
r2 r391 1 2 1 :mod:`pprint` --- Data pretty printer 3 2 ===================================== … … 8 7 .. sectionauthor:: Fred L. Drake, Jr. <fdrake@acm.org> 9 8 9 **Source code:** :source:`Lib/pprint.py` 10 11 -------------- 10 12 11 13 The :mod:`pprint` module provides a capability to "pretty-print" arbitrary … … 29 31 Added support for :class:`set` and :class:`frozenset`. 30 32 33 31 34 The :mod:`pprint` module defines one class: 32 35 … … 34 37 35 38 36 .. class:: PrettyPrinter( ...)39 .. class:: PrettyPrinter(indent=1, width=80, depth=None, stream=None) 37 40 38 41 Construct a :class:`PrettyPrinter` instance. This constructor understands … … 71 74 The :class:`PrettyPrinter` class supports several derivative functions: 72 75 73 .. Now the derivative functions: 74 75 .. function:: pformat(object[, indent[, width[, depth]]]) 76 .. function:: pformat(object, indent=1, width=80, depth=None) 76 77 77 78 Return the formatted representation of *object* as a string. *indent*, *width* … … 83 84 84 85 85 .. function:: pprint(object [, stream[, indent[, width[, depth]]]])86 .. function:: pprint(object, stream=None, indent=1, width=80, depth=None) 86 87 87 88 Prints the formatted representation of *object* on *stream*, followed by a 88 newline. If *stream* is omitted, ``sys.stdout`` is used. This may be used in89 newline. If *stream* is ``None``, ``sys.stdout`` is used. This may be used in 89 90 the interactive interpreter instead of a :keyword:`print` statement for 90 91 inspecting values. *indent*, *width* and *depth* will be passed to the … … 204 205 -------------- 205 206 206 This example demonstrates several uses of the :func:`pprint` function and its parameters. 207 This example demonstrates several uses of the :func:`pprint` function and its 208 parameters. 207 209 208 210 >>> import pprint
Note:
See TracChangeset
for help on using the changeset viewer.