what's the general way of separating classes?

John Salerno johnjsal at NOSPAMgmail.com
Mon Mar 20 17:01:54 CET 2006

Felipe Almeida Lessa wrote:

> And create an program/modules/__init__.py that have something like
> from program.modules.class1 import class1
> from program.modules.class2 import class2

I'm not sure I understand the point of those two lines, if you are going 
to then do this:

> And, in the rest of your program, you can import class1 and class2 by
> just issuing
> from program.modules import class1, class2

How does the __init__ file help if you are still individually importing 
class1 and class2 in each other module of your program?

More information about the Python-list mailing list