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


Groups > comp.lang.python > #32689

Re: How to improve the usability of nested packages

Path csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <michi.schwarz@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.047
X-Spam-Evidence '*H*': 0.91; '*S*': 0.00; 'subject:How': 0.09; 'imported': 0.09; 'namespace': 0.09; 'terry': 0.09; 'suggest': 0.11; 'library': 0.15; '(but': 0.15; '(like': 0.15; 'different?': 0.16; 'reedy': 0.16; 'sip': 0.16; 'wrote:': 0.17; 'header:In- Reply-To:1': 0.25; 'library.': 0.27; 'received:10.0.0': 0.28; 'trouble': 0.28; 'maybe': 0.29; 'knows': 0.30; 'stuff': 0.30; 'generally': 0.32; 'structure': 0.32; 'yours,': 0.33; 'received:10.0': 0.33; 'to:addr:python-list': 0.33; 'received:google.com': 0.34; 'list': 0.35; 'there': 0.35; 'add': 0.36; 'really': 0.36; 'michael': 0.36; 'message-id:@gmail.com': 0.36; 'received:74.125': 0.36; 'modules': 0.36; 'charset:us- ascii': 0.36; 'subject:: ': 0.38; 'received:10': 0.38; 'to:addr:python.org': 0.39; 'short': 0.39; 'header:Received:5': 0.40; 'your': 0.60; 'header:Message-Id:1': 0.62; 'more': 0.63; 'choose': 0.65; 'lose': 0.71; 'attractive': 0.78; 'fearing': 0.84; 'subject:improve': 0.84; 'concluded': 0.91
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:mime-version:content-type:subject:date:in-reply-to:to :references:message-id:x-mailer; bh=KQKDQsjXX2Q+450hnCwRSOhp2qE3xk0n7y+1XDMk3Qk=; b=l1xdp6DTxuGdph3sp0U3uY27a8BCLkB0w0C6lEdfbB4/EEf8QpYdkJLPZMbxspHIED 4k4rSQ7eeIf95u+sHOB1X1P8SbJDzltza/mSW5Y5bzK5GTTZkRWLJ/DZtE/t03kd9moK lFpWXLLdI5y6t4rtINVeNhXK623X+TFahmYHJiBXeO98D3q6be5CmVLcxsKEvhd90ZvM t6KX2ayZxY+R9o73md/4XtLTlpE79LDuxINUOQzhRvYxvlIRXCy+uLZMuGaaz4Ts7437 OPINb86ChiuyVQ8D6CjovITo68sQLuiTblKRFFb24IYtZ3NpFN1ba2Aqz6BbNiR49ULz 9RIw==
From Michael Schwarz <michi.schwarz@gmail.com>
Mime-Version 1.0 (Apple Message framework v1085)
Content-Type multipart/signed; boundary=Apple-Mail-1--36464804; protocol="application/pkcs7-signature"; micalg=sha1
Subject Re: How to improve the usability of nested packages
Date Sat, 3 Nov 2012 09:54:43 +0100
In-Reply-To <k711ga$967$1@ger.gmane.org>
To python-list@python.org
References <CABdB9Z5sGS4XNw5D7qvq5KciJMHHZrx8WUr4D6ZreqPEVRkCNQ@mail.gmail.com> <k711ga$967$1@ger.gmane.org>
X-Mailer Apple Mail (2.1085)
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
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.3236.1351932911.27098.python-list@python.org> (permalink)
Lines 77
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1351932911 news.xs4all.nl 6947 [2001:888:2000:d::a6]:42147
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:32689

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

Hi Terry

On 2012-W44-5, at 18:56, Terry Reedy wrote:

>> or would you maybe structure the library entirely different?
> 
> Based on my limited experience with subpackages* plus reports on this list about problems, such as yours, I have concluded that subpackages are an attractive nuisance that are generally more trouble than they are worth. I suggest you consider sticking with your original flat (no subpackage) design. (But maybe someone knows better than me how to make subpackages work ;-).

One thing that I would lose is the way I can choose very short names for the packages and modules that are imported into the local namespace (like sip or rtp) and also add new stuff without fearing a namespace conflict in one of the applications using the library.

I really hope there is a better way :-(.

Michael

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


Thread

Re: How to improve the usability of nested packages Michael Schwarz <michi.schwarz@gmail.com> - 2012-11-03 09:54 +0100

csiph-web