[issue24037] Argument Clinic: add the boolint converter

Larry Hastings report at bugs.python.org
Thu Apr 23 21:40:38 CEST 2015


Larry Hastings added the comment:

I think this is silly.

Python has a well-understood concept of "truth":
    https://docs.python.org/3/library/stdtypes.html#truth-value-testing

I assert that the reason people used the "i" format unit for what are really boolean values is because a) the "p" format unit wasn't added until very recently, and b) they were lazy and it was easy to copy-and-paste from other code.

Rather than perpetuate these misguided hacks, when converting code to Argument Clinic we should convert them to properly support truth as defined in Python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24037>
_______________________________________


More information about the Python-bugs-list mailing list