[Python-Dev] YAML (was Re: Extension to ConfigParser)

Bob Ippolito bob at redivi.com
Wed Feb 1 00:21:15 CET 2006

On Jan 31, 2006, at 3:09 PM, Tim Parkin wrote:

> Georg Brandl wrote:
>> Guido van Rossum wrote:
>>> Ah. This definitely isn't what ConfigParser was meant to do. I'd  
>>> think
>>> for this you should use some kind of XML pickle though. That's
>>> horrible if end users must edit it, but great for saving
>>> near-arbitrary persistent data in a readable and occasionally  
>>> editable
>>> (for the developer) form.
>> While we're at it, is the Python library going to incorporate some  
>> parser in the future? YAML seems like a perfectly matching data  
>> format
>> for Python.
> Unfortunately, YAML still doesn't have a fully featured pure python
> parser (pyyaml works on simple yaml documents).

That's the killer for me.  I wanted to try it out once, but since  
there wasn't a good implementation I tossed it.

> p.s. JSON is 'nearly' a subset of YAML (the nearly point is being
> considered by various parties).

There's a subset of JSON that is valid YAML.  The output of  
simplejson is intentionally valid JSON and YAML, for example.   
Basically, the JSON serializer just needs to put whitespace in the  
right places.

JSON isn't a great human editable format... Better than XML I guess,  
but it's not terribly natural.  However, it is simple to implement,  
and the tools to deal with it are very widely available.


More information about the Python-Dev mailing list