➜

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 tovrstra
Recipients
Date 2004-06-14.08:20:37
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
def test1():
    print a
    a += 1
                                                      
                                                      
                                               
a = 1
test1()


This results in a UnboundLocalError, while a is already
assigned

Traceback (most recent call last):
  File "bug.py", line 6, in ?
    test1()
  File "bug.py", line 2, in test1
    print a
UnboundLocalError: local variable 'a' referenced before
assignment
History
Date User Action Args
2007-08-23 14:22:34adminlinkissue972467 messages
2007-08-23 14:22:34admincreate