[issue23480] Minor typo

2015-02-18 Thread SilentGhost
SilentGhost added the comment: If you run the command in your interpreter you'll see that the output is correct. -- assignee: -> docs@python components: +Documentation -Demos and Tools nosy: +SilentGhost, docs@python resolution: -> not a bug status: open -> closed ___

[issue23480] Minor typo

2015-02-18 Thread Martin Panter
Martin Panter added the comment: It returns a string, and the print statement/function prints the contents of that string. Perhaps you are confused between JSON strings, which appear in the output, and Python strings, which hold the characters to output. -- nosy: +vadmium

[issue23480] Minor typo

2015-02-18 Thread Zorigt Bazarragchaa
New submission from Zorigt Bazarragchaa: I found a syntax type in your demo example on https://docs.python.org/2/library/json.html >>> print json.dumps({"c": 0, "b": 0, "a": 0}, sort_keys=True) {"a": 0, "b": 0, "c": 0} The correct return should be a 'str' type not json. Therefore: >>> print j