]> granicus.if.org Git - python/commitdiff
Allow square brackets in the option names; this makes it possible to use
authorFred Drake <fdrake@acm.org>
Mon, 12 Feb 2001 17:18:11 +0000 (17:18 +0000)
committerFred Drake <fdrake@acm.org>
Mon, 12 Feb 2001 17:18:11 +0000 (17:18 +0000)
ConfigParser with GNOME-ish config files that use the internationalization
conventions found in GNOME.

This closes SF bug #131635.

Lib/ConfigParser.py

index 9d55ca76283a53869a1024e6f4c93148e9df07e8..14412a38baecaaa1b2764950117506d8215a8b4d 100644 (file)
@@ -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