Python modules

Dan Sommers dan at tombstonezero.net
Mon Jan 14 16:01:09 CET 2013


On Mon, 14 Jan 2013 15:54:27 +0100, zoom wrote:

> Is there any "rules" regarding importing python modules within your own
> module? I mean, how does this affects the performance of the program?

"Even the initializers are optimized!" -- Mel, the real programmer

Unless you've profiled it, and the extra memory taken up by unused 
functions or modules is measurable and near the top of the list of 
performance issues, I wouldn't worry about it.

> Now I have two instances of every function within scipy, e.g.
> scipy.r_[a] = sound.scipy.r_[a]

No:  now you have two names for every function within scipy.  The 
functions themselves are not duplicated.

Dan



More information about the Python-list mailing list