[issue9049] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister
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

[issue9050] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister
Andreas Hofmeister added the comment: Duplicate of 9049. Sorry for the inconvenience. -- status: open -> closed ___ Python tracker <http://bugs.python.org/iss

[issue9050] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister
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

[issue9049] UnboundLocalError in nested function

2010-06-21 Thread Andreas Hofmeister
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