From: Inada Naoki Date: Tue, 2 Apr 2019 09:08:46 +0000 (+0900) Subject: bpo-35838: document optionxform must be idempotent (GH-12656) X-Git-Tag: v3.8.0a4~273 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1;p=python bpo-35838: document optionxform must be idempotent (GH-12656) --- diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 185b4a10ec..04b52dc7b2 100644 --- a/Doc/library/configparser.rst +++ b/Doc/library/configparser.rst @@ -721,6 +721,12 @@ be overridden by subclasses or by attribute assignment. >>> list(custom['Section2'].keys()) ['AnotherKey'] + .. note:: + The optionxform function transforms option names to a canonical form. + This should be an idempotent function: if the name is already in + canonical form, it should be returned unchanged. + + .. attribute:: ConfigParser.SECTCRE A compiled regular expression used to parse section headers. The default