Question about 'None'
Steven Bethard
steven.bethard at gmail.com
Thu Jan 27 14:16:06 EST 2005
flamesrock wrote:
> The statement (1 > None) is false (or any other value above 0). Why is
> this?
What code are you executing? I don't get this behavior at all:
py> 100 > None
True
py> 1 > None
True
py> 0 > None
True
py> -1 > None
True
py> -100 > None
True
> (The reason I ask is sortof unrelated. I wanted to use None as a
> variable for which any integer, including negative ones have a greater
> value so that I wouldn't need to implement any tests or initializations
> for a loop that finds the maximum of a polynomial between certain x
> values. Anything is greater than nothing, no?)
Yup, that's the behavior I get with None.
Steve
More information about the Python-list
mailing list