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