Structuring larger applications - ideas

iv at lantic.net iv at lantic.net
Mon May 16 11:03:07 EDT 2005


Hello,

I'm busy with a large application and feel it would eas my work if I
can specify dependencies on the granularity of packages, rather than
modules and classes.  Eg:

- By convention I do the one class per file thing.  SO in python this
means one class per module - naming classes after their modules. (this
helps with version control, and several other little irritations, for
example)
- I'd like to specify once for a _package_ that it depends upon another
_package_.
- The following should then also be true for a module A in package X
(which depends upon package Y):
    1) X should be available in the namespaces of module A (in fact for
all modules in X)
    2) X.B should refer to X.B.B  (I name classes after their modules).

(2) Can be done easily by, eg putting the following in X.__init__.py:
   from B import B

What's the feeling in this group about the idea & plans to get closer
to accimplishing it?

-i




More information about the Python-list mailing list