On 04/12/2018 09:52 PM, Chris Angelico wrote:

foo := a > b   # does this capture 'a', or 'a > b'?
bar := c + d   # 'c' or 'c + d'?

I'm open to argument here, but my thinking is that these should
capture 'a' and 'c + d'.

I think := should act the same as = or there will be plenty of confusion. If one wants to capture less then parenthesis can be used to narrow it down:

  (foo := a) > b

Looked at another way -- you already have the value named as 'a', so why would 
you also name it as 'foo'?

--
~Ethan~
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to