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.01s 2010-09-02 15:31:47.744536. hosted by webfaction.