a = b = 1 just syntactic sugar?
Erik Max Francis
max at alcyone.com
Tue Jun 3 23:27:09 EDT 2003
Ed Avis wrote:
> Is there a way to write an expression which sets b and does return
> something?
Sure, with difficulty. But if the language has been specifically
designed so that assignment is a statement, not an expression, wouldn't
you think it's not considered such a good idea? There might be
enlightenment on the road of figuring out why the language is designed
that way, rather than trying to get around what you perceive as a
limitation but which the community in general considers a feature.
--
Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
__ San Jose, CA, USA && 37 20 N 121 53 W && &tSftDotIotE
/ \ My reputation grows with every failure.
\__/ George Bernard Shaw
More information about the Python-list
mailing list