This repository was archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
[MXNET-696] Define cmp() in Python 3 for line 222 #12191
Merged
Merged
Conversation
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
[__cmp()__ was removed in Python 3](https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons) so this PR recreates it if required leveraging the formula at http://python-future.org/compatible_idioms.html#cmp
Contributor
piyushghai
reviewed
Aug 15, 2018
| try: | ||
| cmp # Python 2 | ||
| except NameError: | ||
| def cmp(x, y): # Python 3 |
Contributor
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add the formula link here as well in comments ?
Contributor
|
LGTM |
vandanavk
approved these changes
Aug 16, 2018
Contributor
vandanavk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
sandeep-krishnamurthy
approved these changes
Aug 17, 2018
sandeep-krishnamurthy
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
LGTM
marcoabreu
added a commit
that referenced
this pull request
Aug 17, 2018
This reverts commit 54ed3e5.
piyushghai
added a commit
to piyushghai/incubator-mxnet
that referenced
this pull request
Aug 17, 2018
…)" This reverts commit 54ed3e5.
vandanavk
added a commit
to vandanavk/incubator-mxnet
that referenced
this pull request
Aug 17, 2018
…)" This reverts commit 54ed3e5.
7 tasks
marcoabreu
pushed a commit
that referenced
this pull request
Aug 17, 2018
6 tasks
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
* Define cmp() in Python 3 for line 222 [__cmp()__ was removed in Python 3](https://docs.python.org/3/whatsnew/3.0.html#ordering-comparisons) so this PR recreates it if required leveraging the formula at http://python-future.org/compatible_idioms.html#cmp * Add URL in the comments * Force a retest * Remove trailing whitespace
XinYao1994
pushed a commit
to XinYao1994/incubator-mxnet
that referenced
this pull request
Aug 29, 2018
…)" (apache#12231) This reverts commit 54ed3e5.
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
cmp() was removed in Python 3 so this PR recreates it if required leveraging the formula at http://python-future.org/compatible_idioms.html#cmp
Description
Define cmp() in Python 3
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments