Assignment to module variable in function has no effect
22:14 05 Oct 2010

I'm wonder why this simple code doesn't work.

In main.py I have

def foo():
    HTTPHelper.setHost("foo")
    host = HTTPHelper.host()

and in HTTPHelper.py:

_host = None
def setHost(host):
    _host = host
def host():
    return _host

But when I step through foo() host becomes NoneType, even though I set it on the line before. Very confused...

python