Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #78621
| Date | 2014-10-02 14:50 -0400 |
|---|---|
| From | Dave Angel <d@davea.name> |
| Subject | Re: Keepin constants, configuration values, etc. in Python - dedicated module or what? |
| References | <54hqfb-nan.ln1@chris.zbmc.eu> <mailman.14483.1412082752.18130.python-list@python.org> <vrsqfb-ndq.ln1@chris.zbmc.eu> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.14561.1412275829.18130.python-list@python.org> (permalink) |
On 09/30/2014 10:55 AM, cl@isbd.net wrote: > Dave Angel <davea@davea.name> wrote: >> .... >> name. And presumably you never remove an old name from the >> config. >> > The only things really likely to change (and may change regularly) are > the conversion factors, drifting voltage references etc. will > inevitably require these to be recalibrated every so often. Other > than that it's just typos or me deciding to change the name of > something. > Right there you have an important design decision. You then presumably have to have a way that each particular data point can record what configuration it's associated with. If you just change the calibration data externally, then all the old records are invalidated. > >> More troublesome is adding a new kind of data. You have to decide >> whether it's worth generalizing the code to anticipate the >> change, or just admit that the code will grow at that point and >> that old code won't deal with the new data. >> > There's a separate module for each input type (just ADC and 1-wire at > the moment), I don't anticipate any more though I suppose there might > be digital inputs one day. So a configuration [file] for each type > seems to make sense, generalising it would be more trouble than it's > worth I think. > > -- DaveA
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