[Python-ideas] Inline assignment expression

And Clover and-dev at doxdesk.com
Sat Mar 14 18:15:10 CET 2009


Jervis Whitley wrote:

> if (something as x) == other:
>     # can now use x.

Interesting. I'd definitely prefer that to the C-style inline assignment 
syntax: I think it reads better, and there's less chance of the 
Accidental Assignment Instead Of Comparison trap that has plagued other 
languages.

I remain to be convinced that inline assignment is enough of a win in 
general, but if implemented, that's the syntax I'd want.

-- 
And Clover
mailto:and at doxdesk.com
http://www.doxdesk.com/




More information about the Python-ideas mailing list