How to create a dict based on such a file?

Dan Stromberg drsalists at
Tue Feb 15 00:09:02 EST 2011

On Mon, Feb 14, 2011 at 8:31 PM, Westley Martínez <anikom15 at> wrote:
> On Mon, 2011-02-14 at 19:41 -0800, alex23 wrote:
>> On Feb 15, 9:06 am, Steven D'Aprano <steve
>> +comp.lang.pyt... at> wrote:
>> > As I see it, the biggest problems with INI files are:
>> >
>> > * the INI file module that comes with Python is quite primitive;
>> >
>> > * there are many slightly different behaviours you might want in an INI
>> > file, and no clean or obvious way to tell which one you are dealing with
>> > just from the file.
>> [...]
>> > Rant: what I *really hate* is when people use XML just because XML is the
>> > in-thing, not because they need it.
>> Could it possibly be then that people use XML because a) the support
>> is better and b) the behaviour is more predictable? That sounds more
>> like good tool choice than faddism.
> But why is the support better? ... faddism.

1) XML was one of the first such interchange formats, so it naturally
got some press; it was an idea whose time had come.  It's widely
accepted that sometimes a first mover gains an advantage over
follow-on products, even if it's only temporary.
2) XML is highly general
3) XML doesn't suffer from the weird exceptions to general rules that
something like YAML has

But in the future, I'll likely lean more on JSON.

More information about the Python-list mailing list