Wednesday, August 23, 2017

unexpected python scoping

global
nonlocal

https://www.python.org/dev/peps/pep-3104/

https://stackoverflow.com/questions/5218895/python-nested-functions-variable-scoping

nonlocal
https://docs.python.org/3/reference/simple_stmts.html#the-nonlocal-statement

https://stackoverflow.com/questions/5772935/why-doesnt-a-sub-function-inherit-scope-in-python

No comments:

Post a Comment

comment: