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

Ethan Furman ethan at stoneleaf.us
Sun Apr 29 13:19:33 EDT 2018


On 04/27/2018 07:37 PM, Tim Peters wrote:

> Idea:  introduce a "local" pseudo-function to capture the idea of
> initialized names with limited scope.

> Note:  the thing I'm most interested in isn't debates, but in whether
> this would be of real use in real code.

I keep going back and forth on the ":=" syntax as on the one hand I find the functionality very useful but on the other 
hand it's ugly and doesn't really read well.

However, I can say I am solidly

-1

on local, let, etc.:

- local() vs locals(): very similar words with disparate meanings
- more parens -- ugh
- sublocal: one more scope for extra complexity

--
~Ethan~


More information about the Python-ideas mailing list