On Tue, Feb 9, 2010 at 17:07, Srinivas Reddy Thatiparthy
<srinivas_thatipar...@akebonosoft.com> wrote:
> Ok..Got it...
> Especially last sentence caught my eye..
> Does the python compiler behaves same for below expression also?
>
> 1.If(a<b and b<c):
>
> My guess  is, it behaves the same but just wanna double check..
>
You want to know if "b" is evaluated only once?  No.   The (a < b) has
nothing to do with the (b < c), the docs say that

a < b < c

is equivalent to

a < b and b < c

*except that* b is evaluated only once.

That's the difference.

Roshan
_______________________________________________
BangPypers mailing list
BangPypers@python.org
http://mail.python.org/mailman/listinfo/bangpypers

Reply via email to