Equivalent code to the bool() built-in function
Chris Angelico
rosuav at gmail.com
Sun Apr 17 04:46:22 EDT 2011
On Sun, Apr 17, 2011 at 6:38 PM, candide <candide at free.invalid> wrote:
> I also try to consider how essential the bool() type is.
> Again compare with int() or str() types.
Well, of course you can always implement bool as an int; C has done
this for decades, and it hasn't killed it. You can also implement
integers as strings - REXX manages quite well, and gets some
advantages therefrom. But having an explicit bool type has its
benefits too. Essential? No. Useful? Certainly.
Chris Angelico
More information about the Python-list
mailing list