def isHashable(seq): if not isinstance(seq,Hashable): return False elif isSequence(seq): return all(isHashable(s) for s in seq) else: return True