Is this valid ?

Lie Lie.1296 at gmail.com
Thu Mar 20 03:56:13 EDT 2008


On Mar 20, 4:18 am, Stef Mientki <stef.mien... at gmail.com> wrote:
> hello,
>
> by accident I typed a double value test,
> and to my surprise it seems to work.
> Is this valid ?
>
> a = 2
> b = 2
>
> a == b == 2
>
> thanks,
> Stef Mientki

a == b == 2
is equivalent to
a == b and b == 2
except that b is only evaluated once for the whole comparison



More information about the Python-list mailing list