summaryrefslogtreecommitdiff
path: root/Lib/ConfigParser.py
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2001-02-12 17:18:11 +0000
committerFred Drake <fdrake@acm.org>2001-02-12 17:18:11 +0000
commitec26d08e969dcd2c42b9aa497a9a273be2864042 (patch)
tree0a8c7993f70e6a2e35981c91f98cdd13f601ce87 /Lib/ConfigParser.py
parent86731140ea66592a678d3092a3a68ea43ab5a189 (diff)
downloadcpython-ec26d08e969dcd2c42b9aa497a9a273be2864042.tar.gz
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 9d55ca7628..14412a38ba 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