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)
This commit is contained in:
Fred Drake 2004-05-18 03:29:52 +00:00
parent bc12b01d83
commit abc086fb0d
3 changed files with 36 additions and 1 deletions

View file

@ -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}