Sharing code between different projects?

Chris Angelico rosuav at gmail.com
Mon Aug 13 18:16:28 EDT 2012


On Tue, Aug 14, 2012 at 2:53 AM, andrea crotti
<andrea.crotti.0 at gmail.com> wrote:
> The problem is that there are functions/classes from many domains, so it
> would not make much sense to create a real project, and the only name I
> could give might be "utils or utilities"..

There's actually much merit in a generic utilities module. Keep things
nicely segregated (ideally such that you know what things depend on
what other, but at very least keep track of where one ends and another
begins - that's trivial if everything's "one function" or "one class",
but less so when you have a family of related functions), and then you
can consider promoting one block of code to stand-alone module. But in
the meantime, you have a single module used in two places, even if it
doesn't have a very clear definition as yet.

ChrisA



More information about the Python-list mailing list