Namespace problem
Geiger Ho
s997659 at ee.cuhk.edu.hk
Tue May 28 05:27:27 EDT 2002
Hi all,
Consider:
File1.py:
---------
import File2
import File3
class A:
def __init__(self):
self.b = File2.B()
self.c = File3.C()
def run():
pass
if __name__ == '__main__':
a = A()
a.run()
File2.py:
---------
class B:
def foo(self):
pass
File3.py:
---------
class C:
def fun(self):
# a method need to callback a.b.foo()
# how can I implement
Question:
How should I call the a.b.foo() in the fun method?
Thanks in advance.
Regards,
Geiger
More information about the Python-list
mailing list