Guide to organizing modules?

bukzor workitharder at gmail.com
Thu Jun 5 20:32:28 EDT 2008


I've been finding at work that I've written a set of functions several
times, sometimes with more or less features or bugs, so I've decided
to take my small, useful functions and put them in some common place.
I've made a module for this, but it is quickly becoming a jumbled mess
of unrelated functions. Also the one class that I've written with
inheritance takes up fully 1/3 of the documentation (compared to 20
other functions). Since this is a large class I'm thinking of moving
it to a separate module, but on the other hand it seems silly to have
a whole module for just a single class. Also I'm worried that if I
wait till later to organize it better, I'll have a lot of code where
I'll need to fix-up the naming conventions.

In summary: are there any good (or official) guidelines for how to
organize and separate python functions and classes into modules?



More information about the Python-list mailing list