On Wed, May 4, 2016 at 3:33 AM, Donald Stufft <don...@stufft.io> wrote:

> I'd actually prefer not using JSON for something that is human
> editable/writable because I think it's a pretty poor format for that case.
> It
> is overly restrictive in what it allows (for instance, no trailing comma
> gets
> me every time) and the lack of comments I think make it a poor format for
> that.
>

yup -- these are really annoying when JSON is used for a config format.

but INI pretty much sucks, too.

What about PYSON (my term) -- python literals -- could be evaluated with
ast.literal_eval to be safe, and would give us comments, and trailing
commas, and python's richer data types.

or just plain Python -- the file would be imported and we'd specify
particular variables that needed to be defined -- maybe as simple as:

config = a_big_dict_with_lots_of_stuff_in_it.

so it could be purely declarative, but users could also put code in there
to customize the configuration on the fly, too.

-CHB


-- 

Christopher Barker, Ph.D.
Oceanographer

Emergency Response Division
NOAA/NOS/OR&R            (206) 526-6959   voice
7600 Sand Point Way NE   (206) 526-6329   fax
Seattle, WA  98115       (206) 526-6317   main reception

chris.bar...@noaa.gov
_______________________________________________
Distutils-SIG maillist  -  Distutils-SIG@python.org
https://mail.python.org/mailman/listinfo/distutils-sig

Reply via email to