We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 67c9eaa commit 4b6680bCopy full SHA for 4b6680b
1 file changed
Doc/library/pprint.rst
@@ -166,7 +166,7 @@ PrettyPrinter objects
166
>>> import pprint
167
>>> stuff = ['spam', 'eggs', 'lumberjack', 'knights', 'ni']
168
>>> stuff.insert(0, stuff[:])
169
- >>> pp = pprint.PrettyPrinter(indent=4)
+ >>> pp = pprint.PrettyPrinter()
170
>>> pp.pprint(stuff)
171
[
172
['spam', 'eggs', 'lumberjack', 'knights', 'ni'],
@@ -176,12 +176,12 @@ PrettyPrinter objects
176
'knights',
177
'ni',
178
]
179
- >>> pp = pprint.PrettyPrinter(width=41, compact=True, expand=False)
+ >>> pp = pprint.PrettyPrinter(indent=1, width=41, compact=True, expand=False)
180
181
- [ [ 'spam', 'eggs', 'lumberjack',
182
- 'knights', 'ni'],
183
- 'spam', 'eggs', 'lumberjack',
184
- 'knights', 'ni']
+ [['spam', 'eggs', 'lumberjack',
+ 'knights', 'ni'],
+ 'spam', 'eggs', 'lumberjack', 'knights',
+ 'ni']
185
>>> pp = pprint.PrettyPrinter(width=41, indent=3)
186
187
0 commit comments