[Python-ideas] nonlocal functions
masklinn at masklinn.net
Tue Oct 20 20:18:07 CEST 2009
On 20 Oct 2009, at 19:55 , Stefan Behnel wrote:
> Masklinn wrote:
>> If you go that route, I'd suggest removing all the legacy stuff and
>> using "let" to create a new binding in the current scope:
>> def foo():
>> let a = 1
>> let b = 3
> No, please. Why would you want to require so much typing for the most
> common case?
Simpler, clearer, non ambiguous. As opposed to the current scheme of
scope inference which is ambiguous and error prone.
Also, nothing would prevent combining variable creations if need be.
Not like this will ever happen anyway, but a guy can dream.
> And how often would you forget to declare a variable that way?
More information about the Python-ideas