[issue15621] UnboundLocalError on simple in-place assignment of an inner scope
R. David Murray
report at bugs.python.org
Sat Aug 11 03:01:09 CEST 2012
R. David Murray added the comment:
In t2, you assign to num. That makes it local. In t1, you don't, so num is picked up from the global scope.
----------
nosy: +r.david.murray
resolution: -> invalid
stage: -> committed/rejected
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15621>
_______________________________________
More information about the Python-bugs-list
mailing list