Andreas Hofmeister added the comment:
Thank you for your assistance. I apologize for not examining the reference
manual closely.
Is there any way to produce the desired behavior? I currently work around the
local name binding like this:
def x():
a = [False]
def y():
print
Andreas Hofmeister added the comment:
Duplicate of 9049.
Sorry for the inconvenience.
--
status: open -> closed
___
Python tracker
<http://bugs.python.org/iss
New submission from Andreas Hofmeister :
Description:
An unexpected UnboundLocalError is produced when assigning a value to a
variable inside a nested function. The first assignment to the variable is in
the enclosing function.
Example:
def x():
a = False
def y():
print a
New submission from Andreas Hofmeister :
Description:
An unexpected UnboundLocalError is produced when assigning a value to a
variable inside a nested function. The first assignment to the variable is in
the enclosing function.
Example:
def x():
a = False
def y():
print a