[issue10387] ConfigParser's getboolean method is broken

Łukasz Langa report at bugs.python.org
Fri Nov 12 01:35:49 CET 2010


Łukasz Langa <lukasz at langa.pl> added the comment:

This is unfortunately a backwards compatibility concern. Originally it wasn't made so that set() converts to string or accepts only strings and when the developers realized this mistake, it was too late (there were programs using this misfeature). That's one of the reasons SafeConfigParser was created (hence the name).

As I said in my original answer, SafeConfigParser doesn't let you set() anything but a string and this is how it should have been from the start. But we won't break backwards compatibility now, it's far too late for that I'm afraid.

Storing non-string data was misused by some programs by using set() and get() (not getboolean() or getint() etc. but bare get()).

I'm closing this as Won't Fix. Thanks for your input, it's very much appreciated.

----------
resolution:  -> wont fix

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10387>
_______________________________________


More information about the Python-bugs-list mailing list