python 中是否有类似于 sys.maxint 的 sys.minint?
Is there something sys.minint in python similar to sys.maxint?
python 中是否有与 sys.maxint 类似的内容 sys.minint?
The old documentation specifies that it's -sys.maxint - 1
, so could just use that, or make a constant of your own with that value. Do note that in the current version maxint
has been removed 并且可能不应该在新代码中使用。
如果符合您的条件,您可以使用 float('-inf')
,否则您可以使用 -1*sys.maxsize
python 中是否有与 sys.maxint 类似的内容 sys.minint?
The old documentation specifies that it's -sys.maxint - 1
, so could just use that, or make a constant of your own with that value. Do note that in the current version maxint
has been removed 并且可能不应该在新代码中使用。
如果符合您的条件,您可以使用 float('-inf')
,否则您可以使用 -1*sys.maxsize