Esempio n. 1
0
 def __div__(self, other):
     if other.__class__ == self.__class__:
         return self * inverse(other.value, self._base)
     elif type(other) in [int, long]:
         return self * inverse(other, self._base)
     else:
         raise TypeError
Esempio n. 2
0
 def __div__(self, other):
     if other.__class__ == self.__class__:
         return self * inverse(other.value, self._base)
     elif type(other) in [int, long]:
         return self * inverse(other, self._base)
     else:
         raise TypeError
Esempio n. 3
0
 def __rdiv__(self, other):
     return self.__class__(other * inverse(self.value, self._base),
                           self._base)
Esempio n. 4
0
 def __rdiv__(self, other):
     return self.__class__(other * inverse(self.value, self._base),
                           self._base)