Talk:To boolean
Results of this function:
For strings (and probably buffers): Returns false unless the string is "true".
For ints: Returns true unless the integer is 0.
For floats: Truncates, then follows integer rules (as such, -0.7, 0, and 0.7 all return false).
For all other datatypes: Converts to an integer, then follows the integer rules. --Heeheehee 00:29, 11 March 2010 (UTC)