On Tue, Sep 12, 2017 at 8:54 PM, Nick Coghlan wrote:
> On 12 September 2017 at 03:32, João Matos wrote:
>> Hello,
>>
>> You're correct. The idea is to give nonlocal the same ability, redirect
>> subsequent bindings if the variable doesn't exist.
>
> The issue you're facing is that optimised local
On 12 September 2017 at 03:32, João Matos wrote:
> Hello,
>
> You're correct. The idea is to give nonlocal the same ability, redirect
> subsequent bindings if the variable doesn't exist.
The issue you're facing is that optimised local variables still need
to be defined in the compilation unit whe
Hello,
You're correct. The idea is to give nonlocal the same ability, redirect
subsequent bindings if the variable doesn't exist.
No, what I said is that it would only create the var if it didn't exist.
That means that the current behaviour of nonlocal to check all previous
envs (except globa
On 9/11/2017 10:03 AM, João Matos wrote:
Hello,
I would like to suggest that nonlocal should be given the same creating
power as global.
If I do global a_var it creates the global a_var if it doesn't exist.
The global declaration does not create anything, but it redirects
subsequent binding
> Sent: Monday, September 11, 2017 at 10:03 AM
> From: "João Matos"
> To: python-ideas@python.org
> Subject: [Python-ideas] Give nonlocal the same creating power as global
>
> Hello,
>
> I would like to suggest that nonlocal should be given the same crea
Hello,
I would like to suggest that nonlocal should be given the same creating
power as global.
If I do
global a_var
it creates the global a_var if it doesn't exist.
I think it would be great that nonlocal maintained that power.
This way when I do
nonlocal a_var
it would create a_var in
Hello,
I would like to suggest that nonlocal should be given the same creating
power as global.
If I do
global a_var
it creates the global a_var if it doesn't exist.
I think it would be great that nonlocal maintained that power.
This way when I do
nonlocal a_var
it would create a_var in the i