Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #86473
| References | <mclca6$iie$1@ger.gmane.org> |
|---|---|
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | 2015-02-25 21:52 -0700 |
| Subject | Re: Python Worst Practices |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.19241.1424926390.18130.python-list@python.org> (permalink) |
On Wed, Feb 25, 2015 at 1:45 PM, Mark Lawrence <breamoreboy@yahoo.co.uk> wrote: > http://www.slideshare.net/pydanny/python-worst-practices > > Any that should be added to this list? Any that be removed as not that bad? Using XML for configuration is a good example of a worst practice, but using Python instead isn't best practice. There are good arguments that a configuration language shouldn't be Turing-complete. See for instance this blog post: http://taint.org/2011/02/18/001527a.html The problem with XML is just that it's not very human-readable; it doesn't need all the extra power of Python. This may be something that's hard to appreciate until you've actually experienced an outage because somebody checked in a configuration change that parsed and passed tests but nonetheless was invalid due to configuration that couldn't be evaluated until runtime. A better choice for configuration would be something that is both easily readable and *simple* such as JSON or YAML, or an appropriate DSL.
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Re: Python Worst Practices Ian Kelly <ian.g.kelly@gmail.com> - 2015-02-25 21:52 -0700 Re: Python Worst Practices cl@isbd.net - 2015-02-26 10:09 +0000
csiph-web