[Python-Dev] ConfigParser with a single section
Gustavo Niemeyer
niemeyer@conectiva.com
Thu, 7 Nov 2002 20:22:46 -0200
> A vote of -0 means I don't want to make a career out of this <wink>.
>
> http://www.python.org/dev/process.html
>
> A -1 vote is a strong objection; I don't have a strong objection here, I see
> *any* support for anonymous sections in ConfigParser as complicating the
> whole thing for no particular benefit. OTOH, it won't be a disaster for
> Python if some version is accepted, either; I'd just rather it weren't. Or,
Thanks for explaining! I wasn't aware that there were a formal description
for [01][+-] :-)
> IOW, -0. That can't be changed unless someone presents a compelling use
> case for an anonymous section where making up a section name would be a
> believable burden.
The most compeling reason I could see is:
>>> import ConfigParser
>>> cfg = ConfigParser.ConfigParser(singlesection="shell")
>>> cfg.read("/etc/sysconfig/network-scripts/ifcfg-lo")
>>> cfg.get("shell", "ipaddr")
'127.0.0.1'
Besides that, I'm ashamed to say that I'm acting more like a bug-closing
monkey. ;-)
--
Gustavo Niemeyer
[ 2AAC 7928 0FBF 0299 5EB5 60E2 2253 B29A 6664 3A0C ]