Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #27005

Re: Sharing code between different projects?

References <CAF_E5JZ82ar7sWi5eOWe46N2wXVAX2QYUb5F9==0dxRbYMsEhg@mail.gmail.com>
Date 2012-08-14 08:16 +1000
Subject Re: Sharing code between different projects?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.3243.1344896191.4697.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Aug 14, 2012 at 2:53 AM, andrea crotti
<andrea.crotti.0@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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Sharing code between different projects? Chris Angelico <rosuav@gmail.com> - 2012-08-14 08:16 +1000

csiph-web