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

This commit is contained in:
Zackery Spytz 2021-05-18 14:56:01 -07:00 committed by GitHub
parent 02ee819126
commit 4fdcc39f71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -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`,