> From: Jon Siddle <j...@corefiling.co.uk>
> Subject: Re: 3>0 is True
> To: python-list@python.org
> Date: Wednesday, September 15, 2010, 5:04 PM
>   As others have said, it's not
> a matter of precendence. Using the 
> compiler module
> you can see how python actually parses this:
> 
> 3 > (0 is True)
> Compare(Const(3), [('>', Compare(Const(0), [('is',
> Name('True'))]))])
> 
> No great surprise there.
> 
> 3 > 0 is True
> Compare(Const(3), [('>', Const(0)), ('is',
> Name('True'))])
> 
> As you can see, it's not the same. Two comparisons are
> being done "at 
> once", not
> one comparison on the result of another.
> 
> Hope this helps

Thank you all for nailing down this itching issue for me!

All I can say is: Wow!

You all have a teribly nice day!

Yingjie


      
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to