Raymond Hettinger <[email protected]> added the comment:
It seems to me that the sorting howto covers this topic.
If I'm reading the OP's task correctly, it isn't complex at all:
points.sort(key=attrgetter('x', 'y')) # x is primary key; y is secondary
----------
assignee: docs@python -> rhettinger
nosy: +rhettinger
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue35956>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com