diff --git a/natscript/internal/token_.py b/natscript/internal/token_.py index 50dfc36..6d4dcc3 100644 --- a/natscript/internal/token_.py +++ b/natscript/internal/token_.py @@ -67,10 +67,7 @@ def create_value(self, value: Hashable) -> tokenvalue.Value: """Returns a new Value object if value cannot be found in the value cache, otherwise returns the existing Value from the cache. """ - try: - return self._value_cache.get(value, tokenvalue.Value(value)) - except TypeError: # unhashable - return tokenvalue.Value(value) + return self._value_cache.get(value, tokenvalue.Value(value)) @staticmethod def create_iterable_value(value: Iterable[Any]) -> tokenvalue.IterableValue: