It is in Python 2.7 ...
Python 2.7.6 (default, Nov 10 2013, 19:24:18) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> foo = None
>>> bar = 2
>>> foo < bar
True
>>>
But it seems not in Python 3.3 ...
Python 3.3.3 (v3.3.3:c3896275c
Mike Dewhirst writes:
> But it seems not in Python 3.3 ...
>
> Python 3.3.3 (v3.3.3:c3896275c0f6, Nov 18 2013, 21:18:40) [MSC v.1600
> 32 bit (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> foo = None
> >>> bar = 2
> >>> foo < bar
> Traceback (most
Hi Mike
None is not the same as int(0) - it's a bit like javascript's NaN
(not-a-number); it's not 0, it's a complete absence of value; an
indeterminate value. Because of this, it can't actually be successfully
cast to a numeric:
>>> a = None
>>> int(a)
Traceback (most recent call last):
File "
On 7/02/2014 6:36pm, Chris Maclachlan wrote:
Hi Mike
None is not the same as int(0) - it's a bit like javascript's NaN
(not-a-number); it's not 0, it's a complete absence of value; an
indeterminate value. Because of this, it can't actually be successfully
cast to a numeric:
>>> a = None
>>> i
On Fri, Feb 07, 2014 at 06:21:24PM +1100, Mike Dewhirst wrote:
> Maybe there is a trick to it?
>>> (None or 0) < 2
True
___
melbourne-pug mailing list
melbourne-pug@python.org
https://mail.python.org/mailman/listinfo/melbourne-pug