[Python-ideas] PEP 426, YAML in the stdlib and implementation discovery

Devin Jeanpierre jeanpierreda at gmail.com
Mon Jun 3 02:16:19 CEST 2013


On Sat, Jun 1, 2013 at 10:04 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:
> YAML's complexity is the reason I prefer JSON as a data interchange
> format, but I still believe YAML fills a useful niche for more complex
> configuration files where .ini syntax is too limited and JSON is too
> hard to edit by hand.

YAML, unlike JSON, is able to represent non-tree data (it can store
any reference graph). At this point the only stdlib module that can do
that is pickle, which would ordinarily precluded by security concerns.
So adding YAML is excellent even as a data interchange format in the
stdlib -- there is no stdlib module that occupies this particular
intersection of functionality (nominal security and object graphs).

I wrote a Python-Ideas post in the past about including something
in-between json and pickle on the power spectrum, it didn't go over
well, but I figured I'd mention this point again anyway. Sorry.

-- Devin


More information about the Python-ideas mailing list