summaryrefslogtreecommitdiffstats
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-12 17:18:11 (GMT)
committerFred Drake <fdrake@acm.org>2001-02-12 17:18:11 (GMT)
commitd83bbbfd222d7e399fd8b2b17492c1448dc4f2a2 (patch)
tree26a883b7609fa17a475eae02ad2f6a8c18f4ead8 /Lib/ConfigParser.py
parentc17b3cfec1b5c941351e6eabdad7751ed146e5de (diff)
downloadcpython-d83bbbfd222d7e399fd8b2b17492c1448dc4f2a2.zip
cpython-d83bbbfd222d7e399fd8b2b17492c1448dc4f2a2.tar.gz
cpython-d83bbbfd222d7e399fd8b2b17492c1448dc4f2a2.tar.bz2
Allow square brackets in the option names; this makes it possible to use
ConfigParser with GNOME-ish config files that use the internationalization conventions found in GNOME. This closes SF bug #131635.
Diffstat (limited to 'Lib/ConfigParser.py')
-rw-r--r--Lib/ConfigParser.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/ConfigParser.py b/Lib/ConfigParser.py
index 9d55ca7..14412a3 100644
--- a/Lib/ConfigParser.py
+++ b/Lib/ConfigParser.py
@@ -391,7 +391,7 @@ class ConfigParser:
r'\]' # ]
)
OPTCRE = re.compile(
- r'(?P<option>[-\w_.*,(){}]+)' # a lot of stuff found by IvL
+ r'(?P<option>[]\-[\w_.*,(){}]+)' # a lot of stuff found by IvL
r'[ \t]*(?P<vi>[:=])[ \t]*' # any number of space/tab,
# followed by separator
# (either : or =), followed