Raymond Hettinger <[email protected]> added the comment:
There's a case to be made that the current regex is buggy. It already accepts
whitespace around the header name but doesn't strip it. ISTM, this is
undesirable: [ section header ] --> ' section header ' instead of 'section
header'.
>>> import configparser
>>> r = configparser.ConfigParser.SECTCRE
>>> r.match('[ section header ]').group('header')
' section header '
That result is not want people would usually want or expect. I don't see any
advantage to deferring this to 3.3.
----------
keywords: +easy -patch
nosy: +rhettinger
_______________________________________
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