|
|
| Hi, did you know if SafeConfigParser is new in version 2.4 or 2.3 of python? because we found both information in documentation |
| BigDaddy, http://docs.python.org/lib/module-ConfigParser.html clearly says SafeConfigParser is new in 2.3, and my 2.3 has it. where did you read that it was new in 2.4? |
| Mupolan, http://docs.python.org/lib/SafeConfigParser-objects.html |
| BigDaddy, that just says the 'set' method's behaviour is new in 2.4. the SafeConfigParser itself is new in 2.3. |
| Ok, thank you Mupolan, so there is no way to put a new option in an ini file with SafeConfigParser and python 2.3 right? |
| BigDaddy, I'm guessing that SafeConfigParser is a subclass of RawConfigParser, in which case it will still have a set in 2.3 But the set won't do the type check - see the docs for RawConfigParser's set() |
| Peter Pitt, ok so the SafeConfigParser's set is only usefull if I have to check the type, thanks for making it more clear to me |
| BigDaddy, if you're writing to files, SafeConfigParser's set just means you fail earlier when there are non-string values. |