Skip to content

Add sort key function #14

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 13, 2018
Merged

Add sort key function #14

merged 4 commits into from
Jan 13, 2018

Conversation

vidartf
Copy link
Contributor

@vidartf vidartf commented Jan 12, 2018

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).

@podhmo
Copy link
Owner

podhmo commented Jan 13, 2018

Exactly. Thank you for PR. I'll merge it.

@podhmo podhmo merged commit 3433eaa into podhmo:master Jan 13, 2018
@podhmo
Copy link
Owner

podhmo commented Jan 13, 2018

0.3.0 is released (pypi)

@vidartf vidartf deleted the sort-key branch January 13, 2018 12:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants