How to represent the infinite ?

erreur dev at newdeal.ch
Thu Jun 20 11:02:33 EDT 2002


Will somebody have an idea, to represent the infinite one?

I have variables to initialize with is +inf (or - inf).  To be sure that
later, all will be smaller (or larger) than my variables.
I tried to redefine the operators on an object.  It goes for Inf>10 but I do
not arrive for 10>Inf (because that takes > of Int).

--------------------

def __gt__(self, val):

    return 1

--------------------


Not need to say to me that I can use 99999999999999 or -99999999999999 or I
do not know what.
Nor from a MAX_INT of the machine... bus Python can go higher.

Thank you for you answers (thank you to also answer by email if possible,
because I will not have any more access to the news this weekend).

PS: Sorry for my English....





More information about the Python-list mailing list