diff --git a/README.md b/README.md index 2f5cebc..f56b87b 100644 --- a/README.md +++ b/README.md @@ -876,7 +876,7 @@ class MyComparable: def __eq__(self, other): if isinstance(other, type(self)): return self.a == other.a - return False + return NotImplemented ``` ### Hashable @@ -894,7 +894,7 @@ class MyHashable: def __eq__(self, other): if isinstance(other, type(self)): return self.a == other.a - return False + return NotImplemented def __hash__(self): return hash(self.a) ``` diff --git a/index.html b/index.html index d3af7c9..472f974 100644 --- a/index.html +++ b/index.html @@ -782,7 +782,7 @@ creature = Creature() def __eq__(self, other): if isinstance(other, type(self)): return self.a == other.a - return False + return NotImplemented

Hashable