1. abs(): 返回整数的绝对值。
  2. bit_length(): 返回整数的二进制表示的位数。
  3. conjugate(): 返回整数的共轭复数。
  4. from_bytes(bytes, byteorder, *, signed=False): 根据字节数组和字节顺序返回整数。
  5. to_bytes(length, byteorder, *, signed=False): 将整数转换为指定字节长度的字节数组。
  6. denominator: 整数的分母,用于有理数的表示。
  7. numerator: 整数的分子,用于有理数的表示。
  8. real: 整数的实部,用于复数的表示。
  9. imag: 整数的虚部,用于复数的表示。
  10. bit_length(): 返回整数的二进制表示的位数。
  11. to_bytes(length, byteorder, *, signed=False): 将整数转换为指定字节长度的字节数组。
  12. from_bytes(bytes, byteorder, *, signed=False): 根据字节数组和字节顺序返回整数。
  13. add(self, other): 实现整数的加法运算。
  14. sub(self, other): 实现整数的减法运算。
  15. mul(self, other): 实现整数的乘法运算。
  16. floordiv(self, other): 实现整数的整除运算。
  17. mod(self, other): 实现整数的取模运算。
  18. divmod(self, other): 实现整数的除法与取模运算。
  19. pow(self, exponent[, modulus]): 实现整数的幂运算。
  20. lshift(self, other): 实现整数的左移运算。
  21. rshift(self, other): 实现整数的右移运算。
  22. and(self, other): 实现整数的按位与运算。
  23. or(self, other): 实现整数的按位或运算。
  24. xor(self, other): 实现整数的按位异或运算。
  25. invert(self): 实现整数的按位取反运算。

原文地址: https://www.cveoy.top/t/topic/pkTJ 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录