Is there something sys.minint in python similar to sys.maxint ?
Asked
Active
Viewed 3,394 times
2 Answers
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