On 02/07/2018 19:19, Guido van Rossum wrote: > Thank you all. I will accept the PEP as is. I am happy to accept > *clarification* updates to the PEP if people care to submit them as > PRs to the peps repo (https://github.com/python/peps), and that could > even (to some extent) include summaries of discussion we've had, or > outright rejected ideas. But even without any of those I think the PEP > is very clear so I will not wait very long (maybe a week). > It's late to raise this, but what exactly are the objections to the syntax expr -> name # or variations such as expr => name instead of name := expr The PEP mentions that this syntax does not have a problem that "as" does, but does not list any downsides of it. It conforms to left-to-right evaluation, where name:=expr does not. It (I would argue) reduces the asymmetry of the first use of a sub-expression in cases such as [ ( (f(x) -> y)**2, y**3, y**4) for x in iterable ] vs [ ( (y := f(x))**2, y**3, y**4) for x in iterable ] because the first "y" is closer to the way it is used, viz "**2". Regards Rob Cliffe
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