From d0cd0544156947331bd1c062b3e0457f8cdb9f70 Mon Sep 17 00:00:00 2001 From: siliconforks Date: Sun, 12 Apr 2026 12:29:11 -0300 Subject: [PATCH] Use "zero of any numeric type" instead of "numeric zero of all types" This makes the wording of the "Boolean operations" section consistent with the "Truth Value Testing" section. --- Doc/reference/expressions.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 68dcfc00bbd99c..76e1ee74e35def 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -2048,7 +2048,7 @@ Boolean operations 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 +``False``, ``None``, zero of any numeric type, and empty strings and containers (including strings, tuples, lists, dictionaries, sets and frozensets). All other values are interpreted as true. User-defined objects can customize their truth value by providing a :meth:`~object.__bool__` method.