Pablo Galindo Salgado <pablog...@gmail.com> added the comment:

This is not a bug. You are getting an UnboundLocalError because in the scope of 
scoped_def function, scoped_dict is marked as local (because you assign to it 
in the function) but you are reading it before that. 

Please, take a look at:

https://docs.python.org/3/faq/programming.html#why-am-i-getting-an-unboundlocalerror-when-the-variable-has-a-value

and possibly at

https://docs.python.org/3.3/tutorial/classes.html#python-scopes-and-namespaces
https://docs.python.org/3/library/exceptions.html#UnboundLocalError

----------
resolution:  -> not a bug
stage: resolved -> 

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue45705>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to