[Python-Dev] ConfigParser patches

Barry Warsaw barry at python.org
Sat Oct 2 00:38:48 CEST 2004


On Fri, 2004-10-01 at 18:09, Guido van Rossum wrote:

> What I have come to like, both for dealing with XML and with .ini
> files, is something that lets you map the configuration values (or
> whatever it is that you're parsing, really) to Python attributes. This
> is really some kind of simplified DTD support, and there are different
> ways to go about it; but the net result is that you end up writing
> e.g. options.client.max_retries (which is an int with a default value)
> rather than options.getint("client", "max-retries").

An enthusiastic +1.

I'll just note that I often find that generally useful when dealing with
XML files, not just those that represent configuration values.

-Barry

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 307 bytes
Desc: This is a digitally signed message part
Url : http://mail.python.org/pipermail/python-dev/attachments/20041001/4330b42b/attachment.pgp


More information about the Python-Dev mailing list