[Python-checkins] r75623 - python/trunk/Doc/library/configparser.rst

georg.brandl python-checkins at python.org
Fri Oct 23 10:14:45 CEST 2009


Author: georg.brandl
Date: Fri Oct 23 10:14:44 2009
New Revision: 75623

Log:
#7188: fix optionxform() docs.

Modified:
   python/trunk/Doc/library/configparser.rst

Modified: python/trunk/Doc/library/configparser.rst
==============================================================================
--- python/trunk/Doc/library/configparser.rst	(original)
+++ python/trunk/Doc/library/configparser.rst	Fri Oct 23 10:14:44 2009
@@ -334,12 +334,20 @@
 
 .. method:: RawConfigParser.optionxform(option)
 
-   Transforms the option name *option* as found in an input file or as passed in by
-   client code to the form that should be used in the internal structures.  The
-   default implementation returns a lower-case version of *option*; subclasses may
-   override this or client code can set an attribute of this name on instances to
-   affect this behavior.  Setting this to :func:`str`, for example, would make
-   option names case sensitive.
+   Transforms the option name *option* as found in an input file or as passed in
+   by client code to the form that should be used in the internal structures.
+   The default implementation returns a lower-case version of *option*;
+   subclasses may override this or client code can set an attribute of this name
+   on instances to affect this behavior.
+
+   You don't necessarily need to subclass a ConfigParser to use this method, you
+   can also re-set it on an instance, to a function that takes a string
+   argument.  Setting it to ``str``, for example, would make option names case
+   sensitive::
+
+      cfgparser = ConfigParser()
+      ...
+      cfgparser.optionxform = str
 
 
 .. _configparser-objects:


More information about the Python-checkins mailing list