diff options
author | Zackery Spytz <zspytz@gmail.com> | 2021-05-18 21:56:01 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-18 21:56:01 (GMT) |
commit | 4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58 (patch) | |
tree | e952df6c9e71f24a9619ef6cac2ca71edb98bc97 | |
parent | 02ee8191263848f8c8999f72286148946b83e5c9 (diff) | |
download | cpython-4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58.zip cpython-4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58.tar.gz cpython-4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58.tar.bz2 |
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411)
-rw-r--r-- | Doc/tutorial/inputoutput.rst | 3 |
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`, |