Ah, I get it.
Thanks for clearing that up, guys.
--
http://mail.python.org/mailman/listinfo/python-list
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
On Thu, Feb 26, 2009 at 1:48 PM, Jesse Aldridge jessealdri...@gmail.com wrote:
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
I'm pretty sure that Foo is getting replaced once you import Foo, why not
pass the Foo() object to bar's go? I'm sure there are other ways, but yes,
circular imports are indeed evil.
On Thu, Feb 26, 2009 at 5:13 PM, Chris Rebert c...@rebertia.com wrote:
On Thu, Feb 26, 2009 at 1:48 PM, Jesse
On Feb 27, 8:48 am, Jesse Aldridge jessealdri...@gmail.com wrote:
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
On Thu, 2009-02-26 at 13:48 -0800, Jesse Aldridge wrote:
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
Jesse Aldridge wrote:
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
-