summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2012-11-28 22:45:22 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2012-11-28 22:45:22 (GMT)
commit9f94b6dc4b498048d1ae18e2b371b40cb9253c43 (patch)
treeff31f9dcf9cc9ae17c9ed2d7abd040eff89b7bfc
parent100314427a558be01bb42f8bdb4bab800cd114d2 (diff)
downloadcpython-9f94b6dc4b498048d1ae18e2b371b40cb9253c43.zip
cpython-9f94b6dc4b498048d1ae18e2b371b40cb9253c43.tar.gz
cpython-9f94b6dc4b498048d1ae18e2b371b40cb9253c43.tar.bz2
#16333: fix example in docstring.
-rw-r--r--Lib/json/__init__.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py
index 7314cb4..3b23224 100644
--- a/Lib/json/__init__.py
+++ b/Lib/json/__init__.py
@@ -39,8 +39,7 @@ Compact encoding::
Pretty printing::
>>> import json
- >>> s = json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4)
- >>> print('\n'.join([l.rstrip() for l in s.splitlines()]))
+ >>> print(json.dumps({'4': 5, '6': 7}, sort_keys=True, indent=4))
{
"4": 5,
"6": 7