Beispiel #1
0
 def __oct__(self):
     tmp = "0" + _mpz_to_str(abs(self)._mpz, 8)
     return tmp if self >= 0 else "-" + tmp
Beispiel #2
0
 def __hex__(self):
     tmp = "0x" + _mpz_to_str(abs(self)._mpz, 16)
     return tmp if self >= 0 else "-" + tmp
Beispiel #3
0
 def __str__(self):
     if self._mpz_str is None:
         self._mpz_str = _mpz_to_str(self._mpz, 10)
     return self._mpz_str
Beispiel #4
0
 def __oct__(self):
     tmp = '0' + _mpz_to_str(abs(self)._mpz, 8)
     return tmp if self >= 0 else '-' + tmp
Beispiel #5
0
 def __hex__(self):
     tmp = '0x' + _mpz_to_str(abs(self)._mpz, 16)
     return tmp if self >= 0 else '-' + tmp
Beispiel #6
0
 def __str__(self):
     if self._mpz_str is None:
         self._mpz_str = _mpz_to_str(self._mpz, 10)
     return self._mpz_str