[Python-ideas] bool.from_config_str()

jab at math.brown.edu jab at math.brown.edu
Mon Jun 13 15:32:40 EDT 2016


On Mon, Jun 13, 2016 at 3:19 AM, Łukasz Langa <lukasz at langa.pl> wrote:
> Previous discussion about the said patch: http://bugs.python.org/issue25243

(((
I would have linked to that, but:

- That's actually a different patch, and an inaccurate discussion of
it, to boot. For one, in an effort to avoid exactly your bike shedding
concerns, I specifically didn't include "on"/"off" or "yes"/"no" this
time (which I wouldn't have included originally, if it weren't for the
built-in configparser module's using them in getboolean().)

- The mention of the configparser module in that discussion ends up
being distracting, confusing the issue, and taking away from the
productive discussion of it I hoped to have here.

- Case in point, Raymond misunderstood the original patch, and then
never got a chance to respond to my clarifications.

So I was just trying to save people here from wasting time reading an
out-of-date patch and a confusing and inaccurate discussion of it.
)))

--

I know this would only save us from each having to rewrite the same
few-line function. And I know there can be a tradeoff in introducing a
new API like this. If it's just not possible to narrow the scope of
this enough to make it worth it (e.g. would just accepting "True" or
"False", so we offered a round-trip from str(some_bool), settle
this?), I'll leave it at that. But if anyone has any other ideas or
feels it's worth discussing further, I'd be happy to.

Thanks for your consideration!

Josh


More information about the Python-ideas mailing list