This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients Felix.Laurie.von.Massenbach, eric.araujo, lukasz.langa, orsenthil
Date 2010-11-13.10:38:24
SpamBayes Score 3.8043374e-06
Marked as misclassified No
Message-id <20101113103810.GA1026@rubuntu>
In-reply-to <1289611245.62.0.317083076863.issue10387@psf.upfronthosting.co.za>
Content
On Sat, Nov 13, 2010 at 01:20:45AM +0000, Łukasz Langa wrote:
> You think wrong. Try it.

Okay, I get it. Coercing would be a bad idea in RawConfigParser
because there are cases where get method can have raw=True and
coercing would break those behaviors.

The way the OP expressed it, it looked like a bug to me.
Here is one way, the OP's concern can be resolved.

Index: Lib/configparser.py
===================================================================
--- Lib/configparser.py (revision 86441)
+++ Lib/configparser.py (working copy)
@@ -892,6 +892,8 @@
         """
         if value.lower() not in self.BOOLEAN_STATES:
             raise ValueError('Not a boolean: %s' % value)
+        if str(value) in self.BOOLEAN_STATES:
+            return self.BOOLEAN_STATES[str(value)]
         return self.BOOLEAN_STATES[value.lower()]

     def _validate_value_type(self, value):

But this seems specific to the special case as this bug is raised for.
I am personally, +0 for this too.
History
Date User Action Args
2010-11-13 10:38:26orsenthilsetrecipients: + orsenthil, eric.araujo, lukasz.langa, Felix.Laurie.von.Massenbach
2010-11-13 10:38:24orsenthillinkissue10387 messages
2010-11-13 10:38:24orsenthilcreate