Josh Rosenberg added the comment:

Is it even legal to have non-string keys in a JSON object? If they must be 
strings, and they must be unique, I don't think a key argument is necessary 
(and it would save the generation of the key array; not doing the work is 
faster than doing the work more efficiently after all), since the default tuple 
comparison would work fine; the first element would always be unequal, so the 
second elements would never be compared, right?

I'm not 100% on this with the rich comparison operator approach, but my 
attempts to trigger a failure haven't worked (TimSort or the tuple comparison, 
or both, are probably smarter about this than I am).

----------
nosy: +josh.r

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue23493>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to