Why '==' ??

Vrai Stacey spam.trap.vrai.stacey at spam.trap.kbcfp.com
Tue Mar 30 16:16:40 CEST 2004


JCM wrote:
> a = b = c
> a = b == c

I had no idea you could do that! I was under the impression that 
assignment didn't return a value in Python, hence it being impossible to 
use one as a conditional.

That explains the use of '==' then - it's necessary to allow the above 
construct.



More information about the Python-list mailing list