项目开发中需要获取最大值常量

  1. 获取最大整数

    import sys

    sys.maxsize  ---> 2147483647

  2. 获取最大十进制数

    import decimal

    decimal.getcontext().Emax --->999999

    decimal.getcontext().Emin --->-999999