From: suketa Date: Mon, 12 Jun 2017 01:42:59 +0000 (+0900) Subject: bpo-30621: Update Input Output Tutorial Example(GH-2074) X-Git-Tag: v3.7.0a1~621 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1dbce04d0e3e93b715eb0d8024da396361759d16;p=thirdparty%2FPython%2Fcpython.git bpo-30621: Update Input Output Tutorial Example(GH-2074) import json before using json module --- diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index bad0302b0378..92f439c31c92 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"]'