By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,587 Members | 1,575 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,587 IT Pros & Developers. It's quick & easy.

modules and namespaces

P: n/a

I thought that this will work:
def f1():
return string.join('a','a')
def f2():
return string.join('b','b')
import string
import m1
import m2

print f1()
print f2()


However it doesn't work until I import the string module into m1 and m2
modules. I found in the manual that imported modules will be searched in
the container module first. Is it more efficient to import the string
module into main and m1 and m2 than importing only into m1 and m2?

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.