[issue39818] Declaring local variable invalidates access to a global variable

2020-03-01 Thread Grzegorz Krasoń
Grzegorz Krasoń added the comment: Thanks! -- ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.py

[issue39818] Declaring local variable invalidates access to a global variable

2020-03-01 Thread Eric V. Smith
Eric V. Smith added the comment: This is by design. See https://eli.thegreenplace.net/2011/05/15/understanding-unboundlocalerror-in-python for a good explanation. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed __

[issue39818] Declaring local variable invalidates access to a global variable

2020-03-01 Thread Grzegorz Krasoń
New submission from Grzegorz Krasoń : I'm not certain if this is intended behavior, but I would like to make sure. Please resolve with the lowest priority. It seems tricky that line #6 can influence instruction that chronologically appears earlier. Especially taking into account that line #6 i