X-Received: by 10.182.91.68 with SMTP id cc4mr4247551obb.21.1438713477918; Tue, 04 Aug 2015 11:37:57 -0700 (PDT) X-Received: by 10.140.94.145 with SMTP id g17mr60340qge.13.1438713477881; Tue, 04 Aug 2015 11:37:57 -0700 (PDT) Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!pg9no7049887igb.0!news-out.google.com!78ni6368qge.1!nntp.google.com!69no3879721qgl.1!postnews.google.com!glegroupsg2000goo.googlegroups.com!not-for-mail Newsgroups: comp.lang.python Date: Tue, 4 Aug 2015 11:37:57 -0700 (PDT) In-Reply-To: <55c0f103$0$2959$e4fe514c@news2.news.xs4all.nl> Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=94.215.213.97; posting-account=fZjLcQoAAADFZq6LLJ35eHlvRekWYO2i NNTP-Posting-Host: 94.215.213.97 References: <87k2teq9tb.fsf@Equus.decebal.nl> <663ad259-48e0-4eec-a946-7cd03805ddb1@googlegroups.com> <55c0f103$0$2959$e4fe514c@news2.news.xs4all.nl> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: Subject: Re: Most Pythonic way to store (small) configuration From: marco.nawijn@colosso.nl Injection-Date: Tue, 04 Aug 2015 18:37:57 +0000 Content-Type: text/plain; charset=ISO-8859-1 Xref: csiph.com comp.lang.python:94972 On Tuesday, August 4, 2015 at 7:06:33 PM UTC+2, Irmen de Jong wrote: > On 4-8-2015 16:53, marco.nawijn@colosso.nl wrote: > > Why not use Python files itself as configuration files? > > It could create a security risk if the config files are user-editable. > (it will make it easy to inject code into your application) > > Irmen Yes, I am aware of the security risk, but right now I am not too worried about it. To be honest, JSON would be my preferred configuration file format, but as others already mentioned, there is no standard way of adding comments to a JSON file. Marco