import vs from module import : any performance issue?

Aahz aahz at pythoncraft.com
Sat Mar 6 15:43:03 CET 2004


In article <3Rc2c.20653$qA2.1452238 at news20.bellglobal.com>,
Pierre Rouleau  <prouleau at impathnetworks.com> wrote:
>
>Q3:
>It's my understanding that using the "from moduleX import whatever" 
>syntax in moduleA, all of moduleX code will run and only the name 
>"whatever" will be made available to moduleA.  What are the benefit of 
>using this syntax then, is it only the fact that you don't have to type 
>the "moduleX." prefix in moduleA?

Essentially, yes.
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"Do not taunt happy fun for loops. Do not change lists you are looping over."
--Remco Gerlich, comp.lang.python



More information about the Python-list mailing list