Utilisez float ('inf') ou math.inf. (Math.inf provient de Python 3.5)
>>> float('inf')
inf
>>> import math
>>> math.inf
inf
>>> float('inf') == math.inf
True
>>> math.inf > 10 ** 10
True
>>> math.inf < 10 ** 10
False
https://docs.python.org/ja/3/library/math.html#math.inf