| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -146,7 +146,7 @@ def __eq__(self, other): | |||
| 146 | 146 | :returns: True if the entities compare equal, else False. | |
| 147 | 147 | """ | |
| 148 | 148 | if not isinstance(other, Entity): | |
| 149 | - return False | ||
| 149 | + return NotImplemented | ||
| 150 | 150 | ||
| 151 | 151 | return (self.key == other.key and | |
| 152 | 152 | self.exclude_from_indexes == other.exclude_from_indexes and | |
@@ -162,7 +162,7 @@ def __ne__(self, other): | |||
| 162 | 162 | :rtype: bool | |
| 163 | 163 | :returns: False if the entities compare equal, else True. | |
| 164 | 164 | """ | |
| 165 | - return not self.__eq__(other) | ||
| 165 | + return not self == other | ||
| 166 | 166 | ||
| 167 | 167 | @property | |
| 168 | 168 | def kind(self): | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -454,7 +454,7 @@ def __eq__(self, other): | |||
| 454 | 454 | :returns: True if the points compare equal, else False. | |
| 455 | 455 | """ | |
| 456 | 456 | if not isinstance(other, GeoPoint): | |
| 457 | - return False | ||
| 457 | + return NotImplemented | ||
| 458 | 458 | ||
| 459 | 459 | return (self.latitude == other.latitude and | |
| 460 | 460 | self.longitude == other.longitude) | |
@@ -465,4 +465,4 @@ def __ne__(self, other): | |||
| 465 | 465 | :rtype: bool | |
| 466 | 466 | :returns: False if the points compare equal, else True. | |
| 467 | 467 | """ | |
| 468 | - return not self.__eq__(other) | ||
| 468 | + return not self == other | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -123,7 +123,7 @@ def __eq__(self, other): | |||
| 123 | 123 | :returns: True if the keys compare equal, else False. | |
| 124 | 124 | """ | |
| 125 | 125 | if not isinstance(other, Key): | |
| 126 | - return False | ||
| 126 | + return NotImplemented | ||
| 127 | 127 | ||
| 128 | 128 | if self.is_partial or other.is_partial: | |
| 129 | 129 | return False | |
@@ -143,7 +143,7 @@ def __ne__(self, other): | |||
| 143 | 143 | :rtype: bool | |
| 144 | 144 | :returns: False if the keys compare equal, else True. | |
| 145 | 145 | """ | |
| 146 | - return not self.__eq__(other) | ||
| 146 | + return not self == other | ||
| 147 | 147 | ||
| 148 | 148 | def __hash__(self): | |
| 149 | 149 | """Hash a keys for use in a dictionary lookp. | |
| Back | FazBrowse Home | New Git URL |
0 commit comments