None is negative?

Grant Edwards invalid at invalid.invalid
Tue Aug 3 22:32:46 CEST 2010


On 2010-08-03, Grant Edwards <invalid at invalid.invalid> wrote:
> On 2010-08-03, wheres pythonmonks <wherespythonmonks at gmail.com> wrote:
>
>> I did the google search... I must be blind as I don't see any hits...
>>
>> None is negative in Python?  (v2.6)
>
> Not really.
>
>> http://www.google.com/search?ie=UTF-8&q=%22none+is+negative%22+python
>>
>>>>> if None < -9999999.99: print "hi"
>>
>> hi
>>>>>
>>
>>>>> if -9999999 > None: print "hi"
>>
>> hi
>>>>>
>>
>> Is there a way to have the comparison raise an exception?
>
> Use Python 3.x.  Or perhaps there's a "from future import xxxx" way to
> do that as well...  Is there a list of available "from future"
> features somewhere?  I can't seem to figure out how to get Python
> itself to give me a list -- my copy of Python 2.6 insists there's not
> module named future.

Doh! It's "__future__" not "future".  And it doesn't appear that you
can import the "unorderable types" behavior.


-- 
Grant Edwards               grant.b.edwards        Yow! Uh-oh!!  I'm having
                                  at               TOO MUCH FUN!!
                              gmail.com            



More information about the Python-list mailing list