Skip to content

Commit 9a838c5

Browse files
bpo-35838: document optionxform must be idempotent (GH-12656)
(cherry picked from commit 04694a3) Co-authored-by: Inada Naoki <songofacandy@gmail.com>
1 parent 5ca4fe0 commit 9a838c5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

Doc/library/configparser.rst

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -723,6 +723,12 @@ be overridden by subclasses or by attribute assignment.
723723
>>> list(custom['Section2'].keys())
724724
['AnotherKey']
725725

726+
.. note::
727+
The optionxform function transforms option names to a canonical form.
728+
This should be an idempotent function: if the name is already in
729+
canonical form, it should be returned unchanged.
730+
731+
726732
.. attribute:: ConfigParser.SECTCRE
727733

728734
A compiled regular expression used to parse section headers. The default

0 commit comments

Comments
 (0)