Le 17/04/2011 04:39, Ben Finney a écrit :


Why do you need to know? (I should have asked that question earlier.)



First because I was doubting the true interest of the bool() type. In fact, it appears that it's _semantically_ a shortcut for True if x else False. I could't imagine a builtin function having a so trivial implementation. Compare with float() or int(). I also try to consider how essential the bool() type is. Again compare with int() or str() types.

In the orther hand, I'm builting a sort of documentation for learning Python. In order to spell out the purposes of the bool() type, I guessed that giving an equivalence code could help.
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to