summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsuketa <masaki.suketa@nifty.ne.jp>2017-06-12 01:42:59 (GMT)
committerMariatta <Mariatta@users.noreply.github.com>2017-06-12 01:42:59 (GMT)
commit1dbce04d0e3e93b715eb0d8024da396361759d16 (patch)
treeabc21ea38d6896bb0aab373cb6060a1aac7df0f3
parent09663de203396b28483a570bb268c130b59639cf (diff)
downloadcpython-1dbce04d0e3e93b715eb0d8024da396361759d16.zip
cpython-1dbce04d0e3e93b715eb0d8024da396361759d16.tar.gz
cpython-1dbce04d0e3e93b715eb0d8024da396361759d16.tar.bz2
bpo-30621: Update Input Output Tutorial Example(GH-2074)
import json before using json module
-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"]'