diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2006-12-03 12:01:53 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2006-12-03 12:01:53 (GMT) |
commit | a00bcac00382be7f99ef30e24ec029268efa0cbf (patch) | |
tree | 5b7e4f5aadf7a7eaa371d3cb898833bbf9ab009c /Doc | |
parent | 046c4d13beea45c2b89b7b80f2654dff5a38eac8 (diff) | |
download | cpython-a00bcac00382be7f99ef30e24ec029268efa0cbf.zip cpython-a00bcac00382be7f99ef30e24ec029268efa0cbf.tar.gz cpython-a00bcac00382be7f99ef30e24ec029268efa0cbf.tar.bz2 |
Patch #1371075: Make ConfigParser accept optional dict type
for ordering, sorting, etc.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libcfgparser.tex | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/Doc/lib/libcfgparser.tex b/Doc/lib/libcfgparser.tex index 42a362e..b0680d2 100644 --- a/Doc/lib/libcfgparser.tex +++ b/Doc/lib/libcfgparser.tex @@ -48,11 +48,20 @@ Default values can be specified by passing them into the may be passed into the \method{get()} method which will override all others. -\begin{classdesc}{RawConfigParser}{\optional{defaults}} +Sections are normally stored in a builtin dictionary. An alternative +dictionary type can be passed to the \class{ConfigParser} constructor. +For example, if a dictionary type is passed that sorts is keys, +the sections will be sorted on write-back, as will be the keys within +each section. + +\begin{classdesc}{RawConfigParser}{\optional{defaults\optional{, dict_type}}} The basic configuration object. When \var{defaults} is given, it is -initialized into the dictionary of intrinsic defaults. This class -does not support the magical interpolation behavior. +initialized into the dictionary of intrinsic defaults. When \var{dict_type} +is given, it will be used to create the dictionary objects for the list +of sections, for the options within a section, and for the default values. +This class does not support the magical interpolation behavior. \versionadded{2.3} +\versionchanged{\var{dict_type} was added}[2.6] \end{classdesc} \begin{classdesc}{ConfigParser}{\optional{defaults}} |