Where to import modules?

Andreas Neudecker a.neudecker at uni-bonn.de
Fri Sep 26 08:29:14 EDT 2003


Hi.

I have a "style" question: Sometimes, modules will only be used in a 
particular, optional, part of a program (function, class), that will not 
always be used when the application is run. So I think it is better to 
import them only there, not on the top of the file (together with the 
other imports). Is that okay, or are there good reasons for not doing so?

Regards

Andreas





More information about the Python-list mailing list