Comparison functions are not supported for sorting in Python 3. Python 3 instead requires a key function. This PR implements such a key function, and additionally adds unit tests for the sort() and rsort() functions. It also exposes the key functions such that consumers can pass this e.g. to sorted() (i.e. for out of place sorting).
Comparison functions are not supported for sorting in Python 3. Python 3 instead requires a key function. This PR implements such a key function, and additionally adds unit tests for the
sort()
andrsort()
functions. It also exposes the key functions such that consumers can pass this e.g. tosorted()
(i.e. for out of place sorting).