This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pablogsal
Recipients jabowery2, lys.nikolaou, pablogsal
Date 2021-11-03.20:34:29
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635971669.49.0.704516769753.issue45705@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-11-03 20:34:29pablogsalsetrecipients: + pablogsal, lys.nikolaou, jabowery2
2021-11-03 20:34:29pablogsalsetmessageid: <1635971669.49.0.704516769753.issue45705@roundup.psfhosted.org>
2021-11-03 20:34:29pablogsallinkissue45705 messages
2021-11-03 20:34:29pablogsalcreate