[Python-ideas] x )= f as shorthand for x=f(x)

Fredrik Johansson fredrik.johansson at gmail.com
Fri Nov 9 16:24:22 CET 2007

On Nov 9, 2007 3:39 PM, Boris Borcic <bborcic at gmail.com> wrote:
> Title says it all. Got used to += et al. My mind often expects augmented
> assignment syntax to exist uniformly for whatever transform.
> If I am not mistaken, python syntax doesn't permit augmented assignment
> operators to sit between parens so that )= wouldn't risk confusing quick
> machine- or eye-scans to match parens.

Would the statement

( x )= f

represent the ordinary assignment x=f or would it become a syntax error?


More information about the Python-ideas mailing list