summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMariatta <Mariatta@users.noreply.github.com>2017-06-12 01:59:05 (GMT)
committerGitHub <noreply@github.com>2017-06-12 01:59:05 (GMT)
commit47c9decb5feabb51416deffd2098ee31d73f1f5f (patch)
treeff879d2a1183d0243c6de9483f268c1c3b7f893d /Doc
parent2737291134d398da9e5b932b0309a6d9d343cb5a (diff)
downloadcpython-47c9decb5feabb51416deffd2098ee31d73f1f5f.zip
cpython-47c9decb5feabb51416deffd2098ee31d73f1f5f.tar.gz
cpython-47c9decb5feabb51416deffd2098ee31d73f1f5f.tar.bz2
bpo-30621: Update Input Output Tutorial Example(GH-2074) (GH-2118)
import json before using json module (cherry picked from commit 1dbce04d0e3e93b715eb0d8024da396361759d16)
Diffstat (limited to 'Doc')
-rw-r--r--Doc/tutorial/inputoutput.rst1
1 files changed, 1 insertions, 0 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index bad0302..92f439c 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -412,6 +412,7 @@ sent over a network connection to some distant machine.
If you have an object ``x``, you can view its JSON string representation with a
simple line of code::
+ >>> import json
>>> json.dumps([1, 'simple', 'list'])
'[1, "simple", "list"]'