The following values are considered falsey, in that they evaluate to
False when applied to a boolean operator.
0, or any numerical value equivalent to zero, for example
__len__methods return 0 or
All other values in Python evaluate to
Note: A common mistake is to simply check for the Falseness of an operation which returns different Falsey values where the difference matters. For example, using
if foo() rather than the more explicit
if foo() is None