FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

Py3 comparison operators by ArvidJB · Pull Request #291 · pythonnet/pythonnet · GitHub

Py3 comparison operators - #291

Closed
ArvidJB wants to merge 9 commits into
pythonnet:masterfrom
ArvidJB:py3_compare
Closed

Py3 comparison operators#291
ArvidJB wants to merge 9 commits into
pythonnet:masterfrom
ArvidJB:py3_compare

Conversation

ArvidJB commented Nov 16, 2016
edited
Loading

Copy link
Copy Markdown
Contributor

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

ArvidJB commented Nov 16, 2016

Copy link
Copy Markdown
Contributor Author

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 commented Nov 23, 2016

Copy link
Copy Markdown
Member

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.

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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


Back | FazBrowse Home | New Git URL