bpo-35838: document optionxform must be idempotent (GH-12656) · python/cpython@9a838c5

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