diff options
author | Fred Drake <fdrake@acm.org> | 2004-05-18 03:29:52 (GMT) |
---|---|---|
committer | Fred Drake <fdrake@acm.org> | 2004-05-18 03:29:52 (GMT) |
commit | abc086fb0df915b702f14fa3d44e79e0a8b8f11f (patch) | |
tree | 116d81dee23637a243b5446b1ee27c78e39741f6 /Doc | |
parent | bc12b01d8349e185c8a52a0f2539e830dfae9adb (diff) | |
download | cpython-abc086fb0df915b702f14fa3d44e79e0a8b8f11f.zip cpython-abc086fb0df915b702f14fa3d44e79e0a8b8f11f.tar.gz cpython-abc086fb0df915b702f14fa3d44e79e0a8b8f11f.tar.bz2 |
ConfigParser:
- don't allow setting options to non-string values; raise TypeError
when the value is set, instead of raising an arbitrary exception
later (such as when string interpolation is performed)
- add tests, documentation
(closes SF bug #810843)
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/lib/libcfgparser.tex | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/Doc/lib/libcfgparser.tex b/Doc/lib/libcfgparser.tex index a64ae53..c67c52d 100644 --- a/Doc/lib/libcfgparser.tex +++ b/Doc/lib/libcfgparser.tex @@ -238,7 +238,9 @@ option in the given \var{section}. \begin{methoddesc}{set}{section, option, value} If the given section exists, set the given option to the specified value; -otherwise raise \exception{NoSectionError}. +otherwise raise \exception{NoSectionError}. \var{value} must be a +string (\class{str} or \class{unicode}); if not, \exception{TypeError} +is raised. \versionadded{1.6} \end{methoddesc} |