2008-07-15: Selected articles now have experimental "comment" links in the left column and at the bottom. You're welcome to use them for commenting and voting on articles. For a bit more on this, see this page. /F

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.03s 2008-07-25 11:05:31.018836. hosted by webfaction.