Here's a little test to make sure you understand (this is one of the
most confusing parts of Python's closures in my opinion):

foo = "I'm foo!"

def working():
    print(foo)

def broken():
    print(foo)

    if False: # There's no way this could cause a problem!
        foo = "This will *never* happen"
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to