[Zope] -1 != -1 ?

Steffen Hausmann steffen@hausmann-family.de
Sun, 17 Nov 2002 17:29:21 +0100


Hi,

I'm a bit confused.

I have a Website with a select field. You can choose numbers between 7
an -7 (<option value="-7">). If the number is positive everything is
fine, but if it is negative Zope behaves strange.

First I convert the string "-7" into an integer

publishRange = int(publishRange)

and then want to know whether it is positive or negative, but

if publishRange < 0:

doesn't react to it (if publishRange > 0: does, if publishRange is
positive).

What am I doing wrong.

MfG Steffen
-- 
Manche Maenner bemuehen sich ein ganzes Leben lang, das Wesen einer Frau
zu verstehen. Andere befassen sich mit weniger schwierigen Dingen, z.B.
der Relativitaetstheorie.