Skip to content

Commit fe7c26d

Browse files
committed
mention how to override boolean evaluation
1 parent 3e876fd commit fe7c26d

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Doc/reference/expressions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1143,7 +1143,8 @@ In the context of Boolean operations, and also when expressions are used by
11431143
control flow statements, the following values are interpreted as false:
11441144
``False``, ``None``, numeric zero of all types, and empty strings and containers
11451145
(including strings, tuples, lists, dictionaries, sets and frozensets). All
1146-
other values are interpreted as true.
1146+
other values are interpreted as true. (See the :meth:`~object.__nonzero__`
1147+
special method for a way to change this.)
11471148

11481149
.. index:: operator: not
11491150

0 commit comments

Comments
 (0)