Kunjesh Kaushik <[email protected]> added the comment:
Mr. Raymond has raised a valid point. On second thought, I think the submitted
patch won't resolve the issue.
>>> import re
>>> r = re.compile(r'\[\s*(?P<header>[^]]+)\s*\]') # as in the patch
>>> r.match('[ section header ]').group('header') # still has issues
'section header '
ISTM, the only solution to this problem is to strip the section headers while
parsing the file. Subsequent access mechanism should also follow suit. IMHO,
section headers should be made case-insensitive as well -- similar to option
keys.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue11027>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com