nonlocal fails ?

Bev In TX countryone77 at gmail.com
Fri Nov 15 13:43:40 EST 2019


> On Nov 15, 2019, at 11:11 AM, Python <python at python.invalid> wrote:
> 
> Richard Damon wrote:
> ...
>> then elsewhere you could do
>> foo(j)
>> and after that j is 2
>> you also could do
>> foo(1)
>> and after that if you did
>> j = 1
>> then now j might have the value 2 as the constant 1 was changed to the
>> value 2 (this can cause great confusion)
> 
> Wow! So fubar that such a feature should definitely makes its
> way into PHP!

I remember fixing a bug caused by this.
Bev in TX


More information about the Python-list mailing list