> module import name':  is there a performance hit to consider when 
> importing the entire module rather than just getting the specific 
> niceFunction()?  

Not significant. Basically import module puts the module name 
into the local names dictionary. "from m import f" puts f into 
the dictionary, so it could save a dictionary lookup, but they 
are pretty fast...

Its not like the whole module gets copied, it's only a single 
name entry in a dictionary, then an extra dictionary access 
when you use a feature of the imported module.

Alan G.
_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to