[Tutor] Many files or one big file?
alan.gauld@bt.com
alan.gauld@bt.com
Wed, 3 Jul 2002 18:15:49 +0100
> > This brings me to a question though. Should the lib be all
> > implemented in one file as you have it or in different files
> I tend towards placing smaller related classes in the same file.
The useful unit of reuse in Python is the file therefore collect
all you need into a file and keep it together. eg. you should
never need to import say 3 separate files to access one feature.
equally we don't want to import a single huge file to access
a single feature so organize on the basis of what might
conceivably be reusable in the future, either by you or somebody
else.
Alan g.