From 7dfda7ffda5093d6e5927d8cd20241bbf71b5245 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Tue, 2 Apr 2019 16:56:43 +0900 Subject: [PATCH] bpo-35838: document optionxform must be idempotent --- Doc/library/configparser.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst index 185b4a10ec990e..04b52dc7b21531 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