summaryrefslogtreecommitdiffstats
path: root/Doc/lib
diff options
context:
space:
mode:
authorFred Drake <fdrake@acm.org>2004-05-18 02:25:51 (GMT)
committerFred Drake <fdrake@acm.org>2004-05-18 02:25:51 (GMT)
commitbc12b01d8349e185c8a52a0f2539e830dfae9adb (patch)
tree8ffc4bc7f6ba01fb3455d9062bc6447fa8e2ddb6 /Doc/lib
parentbeddfcb6d0bb7149b8ce71e7dd26ca9f61fbd373 (diff)
downloadcpython-bc12b01d8349e185c8a52a0f2539e830dfae9adb.zip
cpython-bc12b01d8349e185c8a52a0f2539e830dfae9adb.tar.gz
cpython-bc12b01d8349e185c8a52a0f2539e830dfae9adb.tar.bz2
ConfigParser:
- ensure that option names in interpolations are handled by self.optionxform in the same way that other references to option names - add tests, documentation (closes SF bug #857881, patch #865455)
Diffstat (limited to 'Doc/lib')
-rw-r--r--Doc/lib/libcfgparser.tex9
1 files changed, 9 insertions, 0 deletions
diff --git a/Doc/lib/libcfgparser.tex b/Doc/lib/libcfgparser.tex
index ca9eb2d..a64ae53 100644
--- a/Doc/lib/libcfgparser.tex
+++ b/Doc/lib/libcfgparser.tex
@@ -62,6 +62,13 @@ and \method{items()} methods. The values in \var{defaults} must be
appropriate for the \samp{\%()s} string interpolation. Note that
\var{__name__} is an intrinsic default; its value is the section name,
and will override any value provided in \var{defaults}.
+
+All option names used in interpolation will be passed through the
+\method{optionxform()} method just like any other option name
+reference. For example, using the default implementation of
+\method{optionxform()} (which converts option names to lower case),
+the values \samp{foo \%(bar)s} and \samp{foo \%(BAR)s} are
+equivalent.
\end{classdesc}
\begin{classdesc}{SafeConfigParser}{\optional{defaults}}
@@ -271,6 +278,8 @@ option names case sensitive.
The \class{ConfigParser} class extends some methods of the
\class{RawConfigParser} interface, adding some optional arguments.
+The \class{SafeConfigParser} class implements the same extended
+interface.
\begin{methoddesc}{get}{section, option\optional{, raw\optional{, vars}}}
Get an \var{option} value for the named \var{section}. All the