Loading Modules

C

Cornelius Kölbel

Hello list,

I am wondering about loading modules.What is a good way of doing this?

In my code I got one single function, where I need some functionality
from a built-in module.

Is it a better way to load the module only within the function
pro: the function will only be hit every now and then or only with a
probability of 90%.
So in 90% cases the modules will not be loaded. (preserve
resources)

What is the balance between speed, resources and code style?

Is there a pythonian way for deciding in which case to do what?

Kind regards
Cornelius


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iEYEARECAAYFAk2lvKUACgkQGUgIxT8zfHHMAACcD/i7yDbJ8xLCpycfDEsRexZb
7WUAn1p2lmF/Oh2DnDXoqhWdWtBSvfQH
=+BU7
-----END PGP SIGNATURE-----
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,754
Messages
2,569,521
Members
44,995
Latest member
PinupduzSap

Latest Threads

Top