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 Felix.Laurie.von.Massenbach
Recipients Felix.Laurie.von.Massenbach, eric.araujo, lukasz.langa
Date 2010-11-12.00:15:32
SpamBayes Score 1.0924595e-13
Marked as misclassified No
Message-id <1289520933.69.0.415283878009.issue10387@psf.upfronthosting.co.za>
In-reply-to
Content
Ok, so I understand the issue, but why doesn't the set method simply convert to a string?

>>> from ConfigParser import RawConfigParser
>>> from StringIO import StringIO
>>> parser = RawConfigParser()
>>> config = """
[section]
test = True
"""
>>> parser.readfp(StringIO(config))
>>> parser.get("section", "test")
'True'
>>> parser.getboolean("section", "test")
True
>>> parser.set("section", "test", True)
>>> parser.get("section", "test")
True
>>> parser.getboolean("section", "test")

Traceback (most recent call last):
  File "<pyshell#33>", line 1, in <module>
    parser.getboolean("section", "test")
  File "C:\Python27\lib\ConfigParser.py", line 361, in getboolean
    if v.lower() not in self._boolean_states:
AttributeError: 'bool' object has no attribute 'lower'
History
Date User Action Args
2010-11-12 00:15:33Felix.Laurie.von.Massenbachsetrecipients: + Felix.Laurie.von.Massenbach, eric.araujo, lukasz.langa
2010-11-12 00:15:33Felix.Laurie.von.Massenbachsetmessageid: <1289520933.69.0.415283878009.issue10387@psf.upfronthosting.co.za>
2010-11-12 00:15:32Felix.Laurie.von.Massenbachlinkissue10387 messages
2010-11-12 00:15:32Felix.Laurie.von.Massenbachcreate