Skip to content

Py3 comparison operators #291

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

Closed
wants to merge 9 commits into from
Closed

Conversation

ArvidJB
Copy link
Contributor

@ArvidJB ArvidJB commented Nov 16, 2016

Looks like <, <=, >, >= implementations were dropped when moving from Python 2 to 3.

@ArvidJB
Copy link
Contributor Author

ArvidJB commented Nov 16, 2016

Actually the implementation of <, <=, >, >= seems to be broken for Python 2: it always returns -1:
if (Object.Equals(o1, o2)) { return 0; } return -1;
I've disabled the tests I added for Python 2...

@filmor
Copy link
Member

filmor commented Nov 23, 2016

If you'd cherry-pick b709a4b on top we will use the same code for Python 2 and 3, so Py2 will also benefit from your change. tp_compare has been obsoleted by tp_richcompare a long time ago.

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