[issue35010] sort by partially reversed key tuple
Karthikeyan Singaravelan
report at bugs.python.org
Wed Oct 17 06:36:52 EDT 2018
Karthikeyan Singaravelan <tir.karthi at gmail.com> added the comment:
There was some discussion about it : https://lists.gt.net/python/python/539896#539896 . As suggested by Raymond in the thread the below can be used to get the desired output
items.sort(key=lambda r: r['user'], reverse=True)
items.sort(key=lambda r: r['url'])
----------
nosy: +xtreak
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue35010>
_______________________________________
More information about the Python-bugs-list
mailing list