diff --git a/text.py b/text.py index 37fab1b25..40a8d27b2 100644 --- a/text.py +++ b/text.py @@ -399,7 +399,6 @@ def actions(self, state): def result(self, state, action): new_state = hashabledict(state) # copy to prevent hash issues - assert type(new_state) == hashabledict new_state[action[0]] = action[1] return new_state diff --git a/utils.py b/utils.py index 4d0c680cd..d738f62e6 100644 --- a/utils.py +++ b/utils.py @@ -579,19 +579,19 @@ def __hash__(self): return hash(self.__tuplify__()) def __lt__(self, odict): - assert type(odict) is hashabledict + assert isinstance(odict, hashabledict) return self.__tuplify__() < odict.__tuplify__() def __gt__(self, odict): - assert type(odict) is hashabledict + assert isinstance(odict, hashabledict) return self.__tuplify__() > odict.__tuplify__() def __le__(self, odict): - assert type(odict) is hashabledict + assert isinstance(odict, hashabledict) return self.__tuplify__() <= odict.__tuplify__() def __ge__(self, odict): - assert type(odict) is hashabledict + assert isinstance(odict, hashabledict) return self.__tuplify__() >= odict.__tuplify__()