Skip to content

Patch for sort method cmp->key#2

Open
mppowell wants to merge 2 commits intogmagno:masterfrom
mppowell:master
Open

Patch for sort method cmp->key#2
mppowell wants to merge 2 commits intogmagno:masterfrom
mppowell:master

Conversation

@mppowell
Copy link
Copy Markdown

Newer versions of Python 3 no longer support the cmp argument in the sort function. This patch uses the functools.cmp_to_key() method to convert the lambda function to a function compatible with the key argument instead. This unbreaks the code for newer versions of python (tested on Python 3.6).

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.

1 participant