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 jab
Recipients jab, lukasz.langa, novalis_dt
Date 2015-11-01.23:50:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1446421821.06.0.637302082911.issue25243@psf.upfronthosting.co.za>
In-reply-to
Content
My friend @novalis_dt and I worked up a patch for this including tests (attached). First time working with the CPython codebase but hope it's a reasonable start.

Here's a preview:

~> ./python.exe                                                                                                                                                              Python 3.6.0a0 (default:9f8b5053e30d+, Nov  1 2015, 18:38:37)
[GCC 4.2.1 Compatible Apple LLVM 7.0.0 (clang-700.1.76)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> trues = ['true', 'yes', 'on', '1']
>>> [bool.from_config_str(i) for i in trues]
[True, True, True, True]
>>> falses = ['false', 'no', 'off', '0', '']
>>> [bool.from_config_str(i) for i in falses]
[False, False, False, False, False]


I would be happy to try to make any additional changes necessary (including changing ConfigParser.getboolean to use the new method) if there is interest.

Thanks!
History
Date User Action Args
2015-11-01 23:50:21jabsetrecipients: + jab, novalis_dt, lukasz.langa
2015-11-01 23:50:21jabsetmessageid: <1446421821.06.0.637302082911.issue25243@psf.upfronthosting.co.za>
2015-11-01 23:50:21jablinkissue25243 messages
2015-11-01 23:50:20jabcreate