summaryrefslogtreecommitdiffstats
path: root/Doc/tutorial
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-05-19 08:59:23 (GMT)
committerGitHub <noreply@github.com>2021-05-19 08:59:23 (GMT)
commit5f2afff1ddbf11c8dfa9ddc98fb7a2f2d86eabde (patch)
treecaad5db86f547ae324ec9a9265cbbb2bc0b505d4 /Doc/tutorial
parente57bef1b73abb8e89d927053bd7e4fdbf44687bf (diff)
downloadcpython-5f2afff1ddbf11c8dfa9ddc98fb7a2f2d86eabde.zip
cpython-5f2afff1ddbf11c8dfa9ddc98fb7a2f2d86eabde.tar.gz
cpython-5f2afff1ddbf11c8dfa9ddc98fb7a2f2d86eabde.tar.bz2
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26218)
(cherry picked from commit 4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58) Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Diffstat (limited to 'Doc/tutorial')
-rw-r--r--Doc/tutorial/inputoutput.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 4e27cff..7f83c4d 100644
--- a/Doc/tutorial/inputoutput.rst
+++ b/Doc/tutorial/inputoutput.rst
@@ -480,7 +480,8 @@ 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'])
+ >>> x = [1, 'simple', 'list']
+ >>> json.dumps(x)
'[1, "simple", "list"]'
Another variant of the :func:`~json.dumps` function, called :func:`~json.dump`,