Skip to content

Commit 74eb94a

Browse files
bpo-35765: Clarify references to "object x" in the JSON tutorial (GH-22411) (GH-26219)
(cherry picked from commit 4fdcc39) Co-authored-by: Zackery Spytz <[email protected]>
1 parent 5b5a10c commit 74eb94a

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/tutorial/inputoutput.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,8 @@ If you have an object ``x``, you can view its JSON string representation with a
480480
simple line of code::
481481

482482
>>> import json
483-
>>> json.dumps([1, 'simple', 'list'])
483+
>>> x = [1, 'simple', 'list']
484+
>>> json.dumps(x)
484485
'[1, "simple", "list"]'
485486

486487
Another variant of the :func:`~json.dumps` function, called :func:`~json.dump`,

0 commit comments

Comments
 (0)