Splitting up classes between files
Roy Smith
roy at popmail.med.nyu.edu
Fri Dec 31 09:10:17 EST 1999
I've got a top-level class, a, and a bunch of sub-classes, a1, a2, a3, etc. To
make it easier to manage the code, I'd like to put each in a separate file, but
still have the user be able to import the whole bunch with a single import, i.e.
not have to do "import a, a1, a2, a3, etc".
Can I just put "import a1, a2, a3, etc" in the bottom of my "a.py" file? It
seems like it should work fine, but are there any hidden gotchas?
--
Roy Smith <roy at popmail.med.nyu.edu>
New York University School of Medicine
More information about the Python-list
mailing list