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


Groups > comp.lang.python > #27005

Re: Sharing code between different projects?

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.008
X-Spam-Evidence '*H*': 0.98; '*S*': 0.00; 'meantime,': 0.07; 'nicely': 0.07; 'subject:code': 0.07; 'domains,': 0.09; 'other,': 0.09; 'aug': 0.13; 'yet.': 0.13; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'function"': 0.16; 'functions),': 0.16; 'subject:between': 0.16; 'subject:projects': 0.16; 'wrote:': 0.17; 'module': 0.19; 'received:209.85.214.174': 0.21; 'project,': 0.24; 'least': 0.25; 'header:In-Reply-To:1': 0.25; 'am,': 0.27; 'module.': 0.27; 'message-id:@mail.gmail.com': 0.27; "doesn't": 0.28; 'definition': 0.29; 'related': 0.30; 'ends': 0.30; 'sense': 0.31; 'code': 0.31; 'could': 0.32; 'problem': 0.33; 'to:addr:python-list': 0.33; 'another': 0.33; 'received:google.com': 0.34; 'clear': 0.35; 'generic': 0.35; 'subject:?': 0.35; 'received:209.85': 0.35; 'there': 0.35; 'but': 0.36; 'two': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'things': 0.38; 'to:addr:python.org': 0.39; 'received:209.85.214': 0.39; 'where': 0.40; 'header:Received:5': 0.40; 'real': 0.61; 'family': 0.68; 'promoting': 0.75; 'andrea': 0.84; "everything's": 0.84; '"one': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=GPKQ4Rb55BV/yNN9PM9rW+EL0bfp/Qf+9MvmCXrRdw4=; b=jfRAn1LdWWQax0nO9lZZ3nzQka0WTB2PVTcmy07fGeZnnBw8jUHxCMMN/LemjfCmEt dJ9YJMQFCtSAXQ35UYxD0uOPf1/GjxUPjvbrTiAw/J3j802RyzLTVld4KuNmqpW0IfJn XFHklyuBk/Ov32cedyhOxYptSSWlOcBIiNM+ETtJpxJPgKTbf12IojwSwH3nGDZtPP2p Tz/1gUtuXm6ORtYf7/HTzBjhksUmN5ky9qe1ZwTNMNxY4jVX2b/smenWh4CR0b80h1Fa 0dwG7SIlTfH6zhdogcJygAC94mXs4x2grCIhqLKIEpt6WvyAESVEpI0n+oHMA1c1dehB 11jQ==
MIME-Version 1.0
In-Reply-To <CAF_E5JZ82ar7sWi5eOWe46N2wXVAX2QYUb5F9==0dxRbYMsEhg@mail.gmail.com>
References <CAF_E5JZ82ar7sWi5eOWe46N2wXVAX2QYUb5F9==0dxRbYMsEhg@mail.gmail.com>
Date Tue, 14 Aug 2012 08:16:28 +1000
Subject Re: Sharing code between different projects?
From Chris Angelico <rosuav@gmail.com>
To python-list@python.org
Content-Type text/plain; charset=ISO-8859-1
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.3243.1344896191.4697.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1344896191 news.xs4all.nl 6953 [2001:888:2000:d::a6]:60625
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:27005

Show key headers only | 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