4

Is there something sys.minint in python similar to sys.maxint ?

masaya
  • 67
  • 4
  • 6
  • Possible duplicate of [Maximum and Minimum values for ints](https://stackoverflow.com/questions/7604966/maximum-and-minimum-values-for-ints) – roganjosh May 21 '18 at 10:04

2 Answers2

2

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 and probably shouldn't be used in new code.

Matti Virkkunen
  • 61,328
  • 9
  • 119
  • 152
1

You can use float('-inf') if that meets your criteria otherwise you can do -1*sys.maxsize

birajad
  • 402
  • 7
  • 15