I have one module called foo.py
---------------------
class Foo:
    foo = None

def get_foo():
    return Foo.foo

if __name__ == "__main__":
    import bar
    Foo.foo = "foo"
    bar.go()
---------------------
And another one called bar.py
---------------------
import foo

def go():
    assert foo.get_foo() == "foo"
----------------------
When I run foo.py, the assertion in bar.py fails.  Why?
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to