Message253886
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! |
|
Date |
User |
Action |
Args |
2015-11-01 23:50:21 | jab | set | recipients:
+ jab, novalis_dt, lukasz.langa |
2015-11-01 23:50:21 | jab | set | messageid: <1446421821.06.0.637302082911.issue25243@psf.upfronthosting.co.za> |
2015-11-01 23:50:21 | jab | link | issue25243 messages |
2015-11-01 23:50:20 | jab | create | |
|