]> granicus.if.org Git - python/commitdiff
bpo-30621: Update Input Output Tutorial Example(GH-2074)
authorsuketa <masaki.suketa@nifty.ne.jp>
Mon, 12 Jun 2017 01:42:59 +0000 (10:42 +0900)
committerMariatta <Mariatta@users.noreply.github.com>
Mon, 12 Jun 2017 01:42:59 +0000 (18:42 -0700)
 import json before using json module

Doc/tutorial/inputoutput.rst

index bad0302b03786131d4ad56dc73d40e6e76cee428..92f439c31c920bbd700544bcedec01d5fcd40f52 100644 (file)
@@ -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"]'