Esempio n. 1
0
 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
Esempio n. 2
0
 def __repr__(self):
     result = str()
     for k, v in self.items():
         result += number_to_string(number=v) + "|" + str(k.binary) + "> "
     return result