Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit d83bbbf

Browse files
committed
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.
1 parent c17b3cf commit d83bbbf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/ConfigParser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -391,7 +391,7 @@ def remove_section(self, section):
391391
r'\]' # ]
392392
)
393393
OPTCRE = re.compile(
394-
r'(?P<option>[-\w_.*,(){}]+)' # a lot of stuff found by IvL
394+
r'(?P<option>[]\-[\w_.*,(){}]+)' # a lot of stuff found by IvL
395395
r'[ \t]*(?P<vi>[:=])[ \t]*' # any number of space/tab,
396396
# followed by separator
397397
# (either : or =), followed

0 commit comments

Comments
 (0)