3>0 is True
Michael Ricordeau
michael.ricordeau at gmail.com
Wed Sep 15 08:47:11 EDT 2010
Because "is" operator take precedence on ">" operator .
Le 2010年9月15日 05:34:06 -0700 (PDT),
Yingjie Lan <lanyjie at yahoo.com> a écrit :
> Hi,
>> I am not sure how to interprete this, in the interactive mode:
>> >>> 3>0 is True
> False
> >>> (3>0) is True
> True
> >>> 3> (0 is True)
> True
>> Why did I get the first 'False'? I'm a little confused.
>> Thanks in advance for anybody who shed some light on this.
>> YL
>>>
More information about the Python-list
mailing list