Title: Document references object x but doesn't show it in the example
Type: Stage: patch review
Components: Documentation Versions: Python 3.8, Python 3.7
Status: open Resolution:
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Patrick Rice, ZackerySpytz, docs@python, veky, xtreak
Priority: normal Keywords: patch

Created on 2019-01-18 00:31 by Patrick Rice, last changed 2020-09-26 13:01 by veky.

Pull Requests
URL Status Linked Edit
PR 22411 open ZackerySpytz, 2020-09-25 17:57
Messages (3)
msg333917 - (view) Author: Patrick Rice (Patrick Rice) Date: 2019-01-18 00:31

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'])
'[1, "simple", "list"]'
msg333931 - (view) Author: Karthikeyan Singaravelan (xtreak) * (Python committer) Date: 2019-01-18 02:18
Thanks for the report. I think x here is implied as [1, 'simple', 'list']. Do you want to make it explicit with x = [1, 'simple', 'list'] in the code block?

Removing 3.5 since it's in security fixes only mode.
msg377526 - (view) Author: Vedran Čačić (veky) * Date: 2020-09-26 13:01
I think it would be simpler to just remove the empty name `x`.

"If you have an object, you can ...".
Date User Action Args
2020-09-26 13:01:10vekysetnosy: + veky
messages: + msg377526
2020-09-25 17:57:20ZackerySpytzsetkeywords: + patch
nosy: + ZackerySpytz

pull_requests: + pull_request21449
stage: patch review
2019-01-18 02:18:07xtreaksetnosy: + xtreak

messages: + msg333931
versions: + Python 3.7, Python 3.8, - Python 3.5
2019-01-18 00:31:40Patrick Ricecreate