We're back after a server migration that caused effbot.org to fall over a bit harder than expected. Expect some glitches.

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.