Equivalent code to the bool() built-in function

candide candide at free.invalid
Sat Apr 16 19:51:08 EDT 2011


Le 16/04/2011 23:38, Ben Finney a écrit :

> So the answer to the OP's question is no: the function isn't equivalent
> to the type,


Can bool() type and bool_equivalent() function return different values ?


> because the OP's ‘bool_equivalent’ function necessarily
> uses the built-in ‘bool’ type, while the reverse is not true.


The documentation doesn't seem to state it performs this call. I'm 
referring to
-- §5.10 Boolean operations in Document Reference Python 2.7
-- bool()'s description in Library Reference
-- §5.1 Truth Value Testing in Library Reference







More information about the Python-list mailing list