Search code examples
pythoninfinitybackport

Backporting float("inf") to Python 2.4 and 2.5


I'm backporting my project from Python 2.6 to Python 2.4 and 2.5. In my project I used float("inf"), and now I find it is unavailable on Python 2.5. Is there a backport of it?


Solution

  • I created a backport, tested on Python 2.5+, can probably be easily made to work on Python 2.4:

    https://github.com/cool-RR/GarlicSim/blob/master/garlicsim/garlicsim/general_misc/infinity.py