Options: allow Choices to be hashed

This commit is contained in:
Fabian Dill 2022-01-06 17:03:47 +01:00
parent d2e884b1d9
commit 9894d0672f
1 changed files with 2 additions and 0 deletions

View File

@ -186,6 +186,8 @@ class Choice(Option):
else:
raise TypeError(f"Can't compare {self.__class__.__name__} with {other.__class__.__name__}")
__hash__ = Option.__hash__ # see https://docs.python.org/3/reference/datamodel.html#object.__hash__
class Range(Option, int):
range_start = 0