None is negative?

Ethan Furman ethan at stoneleaf.us
Tue Aug 3 22:43:44 CEST 2010


Grant Edwards 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.
> 
In 2.5 & 2.6 it's __future__.

~Ethan~



More information about the Python-list mailing list