Skip to content

Commit c6a6c1a

Browse files
donbarboshugovk
andauthored
Apply suggestions from code review
Co-authored-by: Hugo van Kemenade <1324225+hugovk@users.noreply.github.com>
1 parent 1ca9963 commit c6a6c1a

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Doc/library/pprint.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@ Functions
7575
:param bool expand:
7676
If ``True``,
7777
opening parentheses and brackets will be followed by a newline and the
78-
following content will be indented by one level, similar to block style
79-
JSON formatting. Incompatible with *compact*.
78+
following content will be indented by one level, similar to
79+
pretty-printed JSON. Incompatible with *compact*.
8080

8181
:param bool sort_dicts:
8282
If ``True``, dictionaries will be formatted with
@@ -446,7 +446,7 @@ cannot be split, the specified width will be exceeded::
446446
'summary': 'A sample Python project',
447447
'version': '1.2.0'}
448448

449-
Lastly, we can achieve block style formatting with the *expand* parameter.
449+
Lastly, we can format like pretty-printed JSON with the *expand* parameter.
450450
Best results are achieved with a higher *indent* value::
451451

452452
>>> pprint.pp(project_info, indent=4, expand=True)

Doc/whatsnew/3.15.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1472,7 +1472,7 @@ pprint
14721472

14731473
* Add an *expand* keyword argument for :func:`pprint.pprint`,
14741474
:func:`pprint.pformat`, :func:`pprint.pp`. If true, the output will be
1475-
formatted in a block style similar to pretty-printed :func:`json.dumps` when
1475+
formatted similar to pretty-printed :func:`json.dumps` when
14761476
*indent* is supplied.
14771477
(Contributed by Stefan Todoran and Semyon Moroz in :gh:`112632`.)
14781478

Lib/pprint.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ def __init__(self, indent=1, width=80, depth=None, stream=None, *,
136136
Incompatible with expand mode.
137137
138138
expand
139-
If true, the output will be formatted in a block style similar to
139+
If true, the output will be formatted similar to
140140
pretty-printed json.dumps() when ``indent`` is supplied.
141141
Incompatible with compact mode.
142142

0 commit comments

Comments
 (0)