From: Benjamin Peterson Date: Tue, 23 Sep 2008 13:32:46 +0000 (+0000) Subject: mention how to override boolean evaluation X-Git-Tag: v2.6~49 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=fe7c26d94274febc77b707324086306b1d96354b;p=thirdparty%2FPython%2Fcpython.git mention how to override boolean evaluation --- diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 1566a99a23a3..e5e40cf0a084 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1143,7 +1143,8 @@ In the context of Boolean operations, and also when expressions are used by control flow statements, the following values are interpreted as false: ``False``, ``None``, numeric zero of all types, and empty strings and containers (including strings, tuples, lists, dictionaries, sets and frozensets). All -other values are interpreted as true. +other values are interpreted as true. (See the :meth:`~object.__nonzero__` +special method for a way to change this.) .. index:: operator: not