-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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
Fix __eq__ and __ne__. #3765
Fix __eq__ and __ne__. #3765
Conversation
return( | ||
self.udf_type == other.udf_type and | ||
self.value == other.value) | ||
|
||
def __ne__(self, other): | ||
return not self == other |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
return self._key() != other._key() | ||
else: | ||
return NotImplemented | ||
return not self == other |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
LGTM |
This updates
__eq__
to do type-checking correctly on all classes (except mock classes defined in unit test modules):It also updates
__ne__
to be exactly:Fixes #3455.