mirror of
https://github.com/python/cpython.git
synced 2025-10-12 01:43:12 +00:00
Fix comments relating to the specific regexs used to parse section and
option names; errors noted by Greg Stein <gstein@lyra.org>.
This commit is contained in:
parent
619c33787b
commit
1ab41fc680
1 changed files with 2 additions and 2 deletions
|
@ -292,11 +292,11 @@ class ConfigParser:
|
||||||
# of \w, _ is allowed in section header names.
|
# of \w, _ is allowed in section header names.
|
||||||
SECTCRE = re.compile(
|
SECTCRE = re.compile(
|
||||||
r'\[' # [
|
r'\[' # [
|
||||||
r'(?P<header>[-\w_.*,(){}]+)' # `-', `_' or any alphanum
|
r'(?P<header>[-\w_.*,(){}]+)' # a lot of stuff found by IvL
|
||||||
r'\]' # ]
|
r'\]' # ]
|
||||||
)
|
)
|
||||||
OPTCRE = re.compile(
|
OPTCRE = re.compile(
|
||||||
r'(?P<option>[-\w_.*,(){}]+)' # - . _ alphanum
|
r'(?P<option>[-\w_.*,(){}]+)' # a lot of stuff found by IvL
|
||||||
r'[ \t]*(?P<vi>[:=])[ \t]*' # any number of space/tab,
|
r'[ \t]*(?P<vi>[:=])[ \t]*' # any number of space/tab,
|
||||||
# followed by separator
|
# followed by separator
|
||||||
# (either : or =), followed
|
# (either : or =), followed
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue