a = b = 1 just syntactic sugar?

Kendear kendear at nospam.com
Tue Jun 3 11:27:37 CEST 2003


Brian Quinlan wrote:
> In C and Perl, assignment is an expression. In Python it is a statement.
> This is a deliberate design decision to prevent people from writing code
> like this:
> 
> while a = 5:
> 	...


so you mean in Python,  =  is just
like if, for, while... ?





More information about the Python-list mailing list