[Python-Dev] PEP 572: Why not := as standard assignment operator? (original) (raw)

Martin Teichmann lkb.teichmann at gmail.com
Thu Apr 26 09:13:19 EDT 2018


Hi list,

when reading PEP 572 I actually liked it a lot - I think it's actually a cool idea. I think it's actually that cool an idea that it should be made the default way of doing an assignment, over time phasing out the good ole =.

This would have several benefits:

in this case, for sure, we should make it possible to chain :=s, for example by making it bind right-to-left, so that a := b := 3 would be a := (b := 3)

I'm sorry if somebody brought that up already, but the discussion has grown so huge that I couldn't read through it entirely.

Greetings

Martin



More information about the Python-Dev mailing list