Equivalent code to the bool() built-in function

Ben Finney ben+python at benfinney.id.au
Sat Apr 16 23:13:28 CEST 2011

candide <candide at free.invalid> writes:

> Is the bool_equivalent() function really equivalent to the bool()
> built-in function ?

The ‘bool’ built-in is not a function.

    >>> type(bool)
    <type 'type'>

 \          “Generally speaking, the errors in religion are dangerous; |
  `\    those in philosophy only ridiculous.” —David Hume, _A Treatise |
_o__)                                           of Human Nature_, 1739 |
Ben Finney

More information about the Python-list mailing list