Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78500
| Path | csiph.com!usenet.pasdenom.info!dedibox.gegeweb.org!gegeweb.eu!nntpfeed.proxad.net!proxad.net!feeder1-2.proxad.net!news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.87.MISMATCH!newsfeed.xs4all.nl!newsfeed1a.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.003 |
| X-Spam-Evidence | '*H*': 0.99; '*S*': 0.00; 'subject:Python': 0.06; 'parser': 0.07; 'suppose': 0.07; 'string': 0.09; 'impose': 0.09; 'literal': 0.09; 'subject:module': 0.09; 'subject:skip:c 10': 0.09; 'thats': 0.09; 'cc:addr:python-list': 0.11; "wouldn't": 0.14; '0),': 0.16; 'agreed,': 0.16; 'assignments': 0.16; 'contexts,': 0.16; 'docs.': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'quoted': 0.16; 'subject:etc.': 0.16; 'subject:values': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'implementing': 0.19; 'code,': 0.22; 'programming': 0.22; 'cc:addr:python.org': 0.22; 'cc:2**0': 0.24; 'certain': 0.27; 'header:In-Reply-To:1': 0.27; 'feature': 0.29; 'am,': 0.29; 'mix': 0.30; 'message-id:@mail.gmail.com': 0.30; 'usually': 0.31; 'ok.': 0.31; 'subject:what': 0.31; 'probably': 0.32; 'stuff': 0.32; 'quite': 0.32; 'trouble': 0.34; 'sense': 0.34; "i'd": 0.34; 'requirement': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'subject:?': 0.36; 'effort': 0.37; 'being': 0.38; 'convention': 0.38; 'ends': 0.38; 'ability': 0.39; 'bad': 0.39; 'chain': 0.60; 'matter': 0.61; "you'll": 0.62; 'kind': 0.63; 'more': 0.64; 'subject:. ': 0.67; 'side': 0.67; 'hand': 0.80; 'bloody': 0.84; 'slope': 0.84; 'worth,': 0.84; 'to:none': 0.92; 'hand,': 0.93; 'imagine': 0.93 |
| 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:cc :content-type; bh=8RAyVhw/JFnSQG9rpq/16xEK3F45C2l/XbVemgI66Qk=; b=ioS25eDGe71+fPAl+REmclTlfDkTZ8OHqgsB1jilYKFcwUz08rx3meXAV7pIPxE8Ss 1CHZDH6ub9b3H+C6hzJMpIbjrnPM5HVbsey/gbHubbDyAxrKuISE3ZfNZLgNRiqS5ODm KN299QLfDd1WTE0dLh/RlFBZZ7+lYa5EvOC5ck8ImygNi6LAIGWNazXQlzULiPHbb0Xi KZvkB77qgmEeHVLbDiPDXDFMjUaqR4CYoMQQ/wm7XLKFSp136FJRmwwlxy4fG9jKFaVU 2fs7V/fAz6SbB8rREtmx65HrUaIleDxEXcEyx9ya7C9udSCS99U1SFXq8zIIUEBexMih 56bA== |
| MIME-Version | 1.0 |
| X-Received | by 10.152.205.38 with SMTP id ld6mr5405743lac.97.1412099185611; Tue, 30 Sep 2014 10:46:25 -0700 (PDT) |
| In-Reply-To | <ed01079d-5103-4136-b4c6-a2e060916e02@googlegroups.com> |
| References | <54hqfb-nan.ln1@chris.zbmc.eu> <36d7ddca-29f4-403c-a64d-611e187afc3a@googlegroups.com> <bgtqfb-ndq.ln1@chris.zbmc.eu> <a140612a-a30d-43eb-93a3-bc08b76b5721@googlegroups.com> <mailman.14489.1412095890.18130.python-list@python.org> <2ea96bcf-e905-4d77-a105-82b27715aa6e@googlegroups.com> <mailman.14490.1412097338.18130.python-list@python.org> <ed01079d-5103-4136-b4c6-a2e060916e02@googlegroups.com> |
| Date | Wed, 1 Oct 2014 03:46:25 +1000 |
| Subject | Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? |
| From | Chris Angelico <rosuav@gmail.com> |
| Cc | "python-list@python.org" <python-list@python.org> |
| Content-Type | text/plain; charset=UTF-8 |
| 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 | <https://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 | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14492.1412099193.18130.python-list@python.org> (permalink) |
| Lines | 21 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1412099193 news.xs4all.nl 2850 [2001:888:2000:d::a6]:56222 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:78500 |
Show key headers only | View raw
On Wed, Oct 1, 2014 at 3:31 AM, Rustom Mody <rustompmody@gmail.com> wrote:
> On the other hand if you impose a convention: Constants file-module has
> NOTHING but constants, thats a non-formal convention and thats ok.
>
> If however you mix it up with other (real) code, you'll get a bloody mess.
> This kind of stuff "7*24*60*60" is borderline and in my experience
> its a slippery slope that ends up being more trouble than its worth.
Agreed, and which side of the border it's on is a matter of opinion.
Suppose you were writing an INI-style parser - would you include this
feature? I probably wouldn't include arithmetic, as it's usually more
effort than it's worth, but it isn't a bad feature inherently. I'd
definitely not include backreferencing (FOO = "bar", followed by
FOO_LEN = len(FOO) or something), or the ability to chain assignments
(FOO = BAR = 0), so those would be advised against in the convention
docs. On the other hand, a quoted string requirement ("foo\nbar")
makes a huge amount of sense in certain contexts, and I can imagine
implementing quite a lot of a programming language's string literal
syntax.
ChrisA
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 12:35 +0100
Re:Keepin constants, configuration values, etc. in Python - dedicated module or what? Dave Angel <davea@davea.name> - 2014-09-30 09:14 -0400
Re: Re:Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 15:55 +0100
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Dave Angel <d@davea.name> - 2014-10-02 14:50 -0400
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 06:15 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 16:06 +0100
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? jkn <jkn_gg@nicorp.f9.co.uk> - 2014-09-30 08:59 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 09:39 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 02:51 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 10:01 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:15 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-09-30 10:31 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:46 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-10-02 00:49 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-02 00:55 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 18:30 +0100
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Chris Angelico <rosuav@gmail.com> - 2014-10-01 03:49 +1000
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? Rustom Mody <rustompmody@gmail.com> - 2014-10-16 18:24 -0700
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? "Neil D. Cerutti" <neilc@norwich.edu> - 2014-09-30 12:16 -0400
Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? cl@isbd.net - 2014-09-30 18:50 +0100
csiph-web