# [Python-Dev] Changes to ConfigParser

Tue, 11 Jul 2000 08:55:13 +0300 (IDT)

On Mon, 10 Jul 2000, Eric S. Raymond wrote:

> First, for completeness there ought to be remove_section and remove_option
> methods (though forgetool does not yet use them).  I have documented these
> as follows:
>
> \begin{methoddesc}{remove_option}{section, option}
> Remove the specified \var{option} from the specified \var{section}.
> If the section does not exist, raise \exception{NoSectionError}.
> If the option existed to be removed, return 1; otherwise return 0.

Ummm..encoding success/failure as return values is not usually a good
idea. Why not raise KeyError if there is no such option in the section?

> \begin{methoddesc}{remove_section}{section}
> Remove the specified \var{section} from the configuration.
> If the section in fact existed, return 1.  Otherwise return 0.

Ditto. Raise a NoSectionError. IF someone wants to ignore the error, they
can either check if it exists, or trap the error.

> Does anybody have a problem with these changes?

I'm +0

--