nonlocal fails ?

Python python at python.invalid
Fri Nov 15 12:11:23 EST 2019


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!





More information about the Python-list mailing list