bpo-23493: json: Change sort_keys in Python encoder same to C (GH-8131)
Stop using key=lambda. This behavior is same to C version encoder.
This commit is contained in:
parent
0b75228700
commit
e25399b40c
|
@ -350,7 +350,7 @@ def _make_iterencode(markers, _default, _encoder, _indent, _floatstr,
|
|||
item_separator = _item_separator
|
||||
first = True
|
||||
if _sort_keys:
|
||||
items = sorted(dct.items(), key=lambda kv: kv[0])
|
||||
items = sorted(dct.items())
|
||||
else:
|
||||
items = dct.items()
|
||||
for key, value in items:
|
||||
|
|
Loading…
Reference in New Issue