diff options
author | Georg Brandl <georg@python.org> | 2012-02-20 23:33:36 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2012-02-20 23:33:36 (GMT) |
commit | 2fb477c0f0284439d40cb3f46eea45ef42446e53 (patch) | |
tree | c8df3747d511256d56ca4af046db7915b5c06096 /Lib/json | |
parent | b5c793a0b349cb02003433c30a410595b224079f (diff) | |
parent | 9edceb3e591063f382ae82e14313813ffc1af0bf (diff) | |
download | cpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.zip cpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.tar.gz cpython-2fb477c0f0284439d40cb3f46eea45ef42446e53.tar.bz2 |
Merge 3.2: Issue #13703 plus some related test suite fixes.
Diffstat (limited to 'Lib/json')
-rw-r--r-- | Lib/json/__init__.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Lib/json/__init__.py b/Lib/json/__init__.py index 6d88931..ba2bc1d 100644 --- a/Lib/json/__init__.py +++ b/Lib/json/__init__.py @@ -31,7 +31,9 @@ Encoding basic Python object hierarchies:: Compact encoding:: >>> import json - >>> json.dumps([1,2,3,{'4': 5, '6': 7}], separators=(',', ':')) + >>> from collections import OrderedDict + >>> mydict = OrderedDict([('4', 5), ('6', 7)]) + >>> json.dumps([1,2,3,mydict], separators=(',', ':')) '[1,2,3,{"4":5,"6":7}]' Pretty printing:: |