Skip to content

Commit 6f4cf93

Browse files
committed
Improve formatting for sys.stdout
Suggested-by: @erlend-aasland
1 parent a9298cd commit 6f4cf93

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Doc/library/pprint.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ Functions
5151
compact=False, sort_dicts=True, underscore_numbers=False)
5252

5353
Prints the formatted representation of *object* on *stream*, followed by a
54-
newline. If *stream* is ``None``, ``sys.stdout`` is used. This may be used
54+
newline. If *stream* is ``None``, :data:`sys.stdout` is used. This may be used
5555
in the interactive interpreter instead of the :func:`print` function for
5656
inspecting values (you can even reassign ``print = pprint.pprint`` for use
5757
within a scope).
@@ -136,9 +136,9 @@ This module defines one class:
136136
Construct a :class:`PrettyPrinter` instance. This constructor understands
137137
several keyword parameters.
138138

139-
*stream* (default ``sys.stdout``) is a :term:`file-like object` to
139+
*stream* (default :data:`sys.stdout`) is a :term:`file-like object` to
140140
which the output will be written by calling its :meth:`!write` method.
141-
If both *stream* and ``sys.stdout`` are ``None``, then
141+
If both *stream* and :data:`sys.stdout` are ``None``, then
142142
:meth:`~PrettyPrinter.pprint` silently returns.
143143

144144
Other values configure the manner in which nesting of complex data
@@ -179,7 +179,7 @@ This module defines one class:
179179
Added the *underscore_numbers* parameter.
180180

181181
.. versionchanged:: 3.11
182-
No longer attempts to write to ``sys.stdout`` if it is ``None``.
182+
No longer attempts to write to :data:`sys.stdout` if it is ``None``.
183183

184184
>>> import pprint
185185
>>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']

0 commit comments

Comments
 (0)