Skip to content

Commit

Permalink
Return 'NotImplemented', rather than raising 'NotImplementedError', f…
Browse files Browse the repository at this point in the history
  • Loading branch information
tseaver committed Feb 12, 2015
1 parent 5badbc4 commit f5e4b40
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gcloud/datastore/entity.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __eq__(self, other):
:returns: True if the entities compare equal, else False.
"""
if not isinstance(other, Entity):
raise NotImplementedError
return NotImplemented

return (self.key == other.key and
dict(self) == dict(other))
Expand Down
2 changes: 1 addition & 1 deletion gcloud/datastore/key.py
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ def __eq__(self, other):
:returns: True if the keys compare equal, else False.
"""
if not isinstance(other, Key):
raise NotImplementedError
return NotImplemented

if self.is_partial or other.is_partial:
return False
Expand Down

0 comments on commit f5e4b40

Please sign in to comment.