def __repr__(self): result = "" if self._coeff is not None: result = number_to_string(self.coeff) for k, v in self._data.items(): result += str(v) + "(" + str(k) + ")" return result
def __repr__(self): result = str() for k, v in self.items(): result += number_to_string(number=v) + "|" + str(k.binary) + "> " return result