[Python-checkins] bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26219)

iritkatriel webhook-mailer at python.org
Wed May 19 04:59:56 EDT 2021


https://github.com/python/cpython/commit/74eb94af2b0ca652d4b6b9b853601a8b8ac7dca1
commit: 74eb94af2b0ca652d4b6b9b853601a8b8ac7dca1
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: iritkatriel <iritkatriel at yahoo.com>
date: 2021-05-19T09:59:36+01:00
summary:

bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26219)

(cherry picked from commit 4fdcc39f711e1b586a94e2c5088fdd7e78fd9f58)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
M Doc/tutorial/inputoutput.rst

diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst
index 4e27cff83ce59..7f83c4d4612eb 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`,



More information about the Python-checkins mailing list