[Python-ideas] A "local" pseudo-function

Zero Piraeus schesis at gmail.com
Sat Apr 28 06:22:04 EDT 2018


:

On 28 April 2018 at 07:07, Tim Peters <tim.peters at gmail.com> wrote:
> [...] For that matter, I'd be fine too with shortening it to "let".  In
> fact, I prefer that!  Thanks :-)

If you really wanted to overcome objections that this looks too much
like a function, you could spell it "$". I'm not sure what I think
about

    $(a=7, $(a=a+1, a*2))

yet, but it doesn't make me want to run screaming in the way that := does.

I think I finally worked out why I have such a violent reaction to :=
in the end, by the way: it's because it reminds me of Javascript's
"===" (not the meaning, but the fact that it exists).

 -[]z.


More information about the Python-ideas mailing list