[Python-Dev] assignment expressions: an alternative alternative proposal (original) (raw)

Antoine Pitrou solipsis at pitrou.net
Tue Apr 24 18:16:04 EDT 2018


On Tue, 24 Apr 2018 09:38:33 -0400 Yury Selivanov <yselivanov.ml at gmail.com> wrote:

I propose to use the following syntax for assignment expressions:

( NAME = expr ) I know that it was proposed before and this idea was rejected, because accidentally using '=' in place of '==' is a pain point in C/C++/JavaScript.

To solve this issue, I would suggest another syntax:

var NAME = expr

Strong points:

Weak points:

(alternative keyword choices against "var": "using", "let", "bind"...)

Regards

Antoine.



More information about the Python-Dev mailing list