Hi there Everybody,

      I have style question with importing of modules and classes.
Presently, I have several files importing several modules.

#apacheModule
import dbBase
import dbCommon
import miscBase

My question is there any advantage to me wrapping them in a single file
(wrapper), and the importing a single file
into that file (barring namespace collisons). Example shown below:

In aggreateBase:
import dbBase
import dbCommon
import miscBase

In apacheModule:
import aggreateBase
# instead of
#import dbBase
#import dbCommon
#import miscBase

or perhaps even
In aggreateBase:
from dbBase import dbBase
from dbCommon import dbCommon
from miscBase import miscBase

The two advantages that I can see are, I don't need to type as much, and
there would be a speed up in the execution of code.
Is there a reason why I shouldn't?

Thanks in advance,
Tino
_______________________________________________
Tutor maillist  -  [email protected]
http://mail.python.org/mailman/listinfo/tutor

Reply via email to