mirror of
https://github.com/MarioSpore/Grinch-AP.git
synced 2025-10-21 20:21:32 -06:00
Options: allow Choices to be hashed
This commit is contained in:
@@ -186,6 +186,8 @@ class Choice(Option):
|
|||||||
else:
|
else:
|
||||||
raise TypeError(f"Can't compare {self.__class__.__name__} with {other.__class__.__name__}")
|
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):
|
class Range(Option, int):
|
||||||
range_start = 0
|
range_start = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user