[Python-checkins] bpo-35838: document optionxform must be idempotent (GH-12656)

Inada Naoki webhook-mailer at python.org
Tue Apr 2 05:08:52 EDT 2019


https://github.com/python/cpython/commit/04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1
commit: 04694a306b8f4ab54ef5fc4ba673c26fa53b0ac1
branch: master
author: Inada Naoki <songofacandy at gmail.com>
committer: GitHub <noreply at github.com>
date: 2019-04-02T18:08:46+09:00
summary:

bpo-35838: document optionxform must be idempotent (GH-12656)

files:
M Doc/library/configparser.rst

diff --git a/Doc/library/configparser.rst b/Doc/library/configparser.rst
index 185b4a10ec99..04b52dc7b215 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



More information about the Python-checkins mailing list