Replying also to the list. On 22 April 2018 at 09:14, Ivan Levkivskyi <levkivskyi at gmail.com> wrote: > On 20 April 2018 at 21:59, Guido van Rossum <guido at python.org> 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! >> >> > * FWIW I an -1 on anything but a simple name. > > * 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. > > -- > Ivan > > > -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20180422/b0ee8b62/attachment.html>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4