[Python-ideas] PEP 572: Assignment Expressions (post #4)

Ethan Furman ethan at stoneleaf.us
Wed Apr 11 20:44:44 EDT 2018


On 04/11/2018 04:46 PM, Chris Angelico wrote:

> For myself, I've been back and forth a bit about whether "as" or ":="
> is the better option. Both of them have problems. Both of them create
> edge cases that could cause problems. Since the problems caused by
> ":=" are well known from other languages (and are less serious than
> they would be if "=" were the operator), I'm pushing that form.
> However, the 'as' syntax is a close contender (unlike most of the
> other contenders), so if someone comes up with a strong argument in
> its favour, I could switch.

While I strongly prefer "as", if it can't be made to work in the grammar then that option is pretty much dead, isn't it? 
  In which case, I'll take ":=".

--
~Ethan~



More information about the Python-ideas mailing list