[New-bugs-announce] [issue5412] extend configparser to support [] syntax

Jeff Kaufman report at bugs.python.org
Tue Mar 3 16:14:36 CET 2009

New submission from Jeff Kaufman <jkaufman at bbn.com>:

This is a patch against the configparser in the cvs version of 3.1 to
support [] notation:

>>> import configparser_patched
>>> config = configparser_patched.SafeConfigParser()
>>> config.add_section("spam")
>>> config["spam", "eggs"] = "yummy"
>>> config["spam", "eggs"]
>>> del config["spam", "eggs"]

The functions are just syntactic sugar for the simple forms of "get",
"set", and "remove_option".

components: Library (Lib)
files: configparser.patch
keywords: patch
messages: 83075
nosy: jkaufman
severity: normal
status: open
title: extend configparser to support [] syntax
type: feature request
versions: Python 3.1
Added file: http://bugs.python.org/file13234/configparser.patch

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list