From b08c78ddfe4c6d5c92f6bd9296032ae3909e6954 Mon Sep 17 00:00:00 2001 From: Zackery Spytz Date: Fri, 25 Sep 2020 11:55:42 -0600 Subject: [PATCH] bpo-35765: Clarify references to "object x" in the JSON tutorial --- Doc/tutorial/inputoutput.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Doc/tutorial/inputoutput.rst b/Doc/tutorial/inputoutput.rst index 366a532e817afad..b25b1efcf7df29c 100644 --- a/Doc/tutorial/inputoutput.rst +++ b/Doc/tutorial/inputoutput.rst @@ -475,7 +475,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`,