return NotImplemented for other types

This commit is contained in:
darksidecat 2022-06-26 17:12:54 +03:00
parent c952a730c2
commit 36fbfc06d5

View file

@ -59,7 +59,7 @@ class State:
return self.state == other.state
if isinstance(other, str):
return self.state == other
return False
return NotImplemented
def __hash__(self) -> int:
return hash(self.state)