[Python-Dev] ConfigParser changes
Eric S. Raymond
esr@thyrsus.com
Fri, 14 Jul 2000 10:22:56 -0400
Guido van Rossum <guido@beopen.com>:
> One possible suggestion (just for your contemplation): if you're only
> adding methods, would it make sense to make a subclass, so that from
> the class one uses it is clear whether one intends to modify the
> options or just to read them? That would enable future optimizations.
Yes, and I even know what I'd call the class: ConfigEditor.
Unfortunately this plan it trips on a historical fact; one (1) of the
write methods, add_section(), already existed in ConfigParser. Moving
it to a ConfigEditor subclass would break backward compatibility. And
I think it would be just too ugly to move all but one of the write
methods into ConfigEditor and leave add_section() in the base class.
If not for this problem I would be more than happy to do as you suggest.
--
<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>
"Those who make peaceful revolution impossible
will make violent revolution inevitable."
-- John F. Kennedy