Skip to content

Fix cmp function to act more like python2 cmp function #573

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 10 commits into from
Jun 22, 2021

Conversation

rtaycher
Copy link
Contributor

python2 was a lot more loose in comparing types and while it didn't always make sense
it sucks if code randomly breaks by throwing TypeException (depending on code branch/cmp arguments) after porting.

I tested it with a wide range of basic types and odd values to make sure it worked a bit like the old cmp function
I also included those tests as a unittest

@rtaycher
Copy link
Contributor Author

@sfdye
@jmadler
Sorry I've had this open for a while is there anything else I need to do? has future been abandoned should I push this to some other fork?

@edschofield edschofield merged commit bcb8513 into PythonCharmers:master Jun 22, 2021
@edschofield
Copy link
Contributor

Looks good to me. Thanks, @rtaycher !

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