[Python-ideas] Inline assignment expression
aahz at pythoncraft.com
Sun Mar 15 15:04:13 CET 2009
On Sun, Mar 15, 2009, Nick Coghlan wrote:
> B. The proposal uses different assignment syntax ('x -> y', 'y <- x', 'x
> as y') and runs afoul of the question of why are there two forms of
> assignment statement? (Since any expression can be a statement, the new
> embedded assignment syntax would either work as a statement as well, or
> else a special rule would have to added to the compiler to say "cannot
> use embedded assignment expression as statement - use an assignment
> statement instead").
Just for the record, the most common different syntax suggested has
historically been Pascal's ``:=``
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
Adopt A Process -- stop killing all your children!
More information about the Python-ideas