Replying also to the list.
On 22 April 2018 at 09:14, Ivan Levkivskyi firstname.lastname@example.org wrote:
On 20 April 2018 at 21:59, Guido van Rossum email@example.com wrote:
Does the PEP currently propose to allow that horrible example? I thought Tim Peters successfully pleaded to only allow a single "NAME :=
<expr>". You don't have to implement this restriction -- we know it's possible to implement, and if specifying this alone were to pull enough people from -1 to +0 there's a lot of hope!
Also Tim proposed a good idea to call these "binding expressions". Because in contrasts the different purposes. Binding expressions would be probably typically used to (temporarily) name an expression, while assignment statements are actually creating "variables" -- long living names intended to be accessed externally to a class/module. The latter access can be programmed to trigger arbitrary complex code (see properties, __getattr__/__setattr__, etc).
Re implementing restrictions: there is a CST -> AST step that will allow to easily prohibit unwanted forms (FWIW this is how unpacking an chaining is prohibited for annotated assignments).
Re using plain "=": Although I am still using this in C quite often, I was bitten badly by this several times when I was younger, I don't want a similar experience when _learning_ Python.
Modulo these points I would be +0 on the PEP.