bool

bool([value])

Converts a value to a Boolean, using the standard truth testing procedure. If the value is false or omitted, this returns False; otherwise it returns True.

bool is also a class, which is a subclass of int. Class bool cannot be subclassed further. Its only instances are False and True.

New in version 2.2.1. Changed in version 2.3: If no argument is given, this function returns False.

 

A Django site. this page was rendered by a django application in 0.00s 2012-02-09 20:05:18.677542. hosted by webfaction.