From 60a03546687702a0f66aa68451fbe75c2b158d6a Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 16 Feb 2024 01:39:44 -0600 Subject: [PATCH] Slightly improve clarity of logical bool ops The doc states that these "return true" but more precisely they're the "typical" short-circuiting boolean operations with Python-like semantics. ``and`` and ``or`` may not return booleans at all depending on their inputs. --- docs/templates.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/templates.rst b/docs/templates.rst index aff7e172c..100f11b1b 100644 --- a/docs/templates.rst +++ b/docs/templates.rst @@ -1416,13 +1416,13 @@ For ``if`` statements, ``for`` filtering, and ``if`` expressions, it can be usef combine multiple expressions: ``and`` - Return true if the left and the right operand are true. + For ``x and y``, if ``x`` is false, then the value is ``x``, else ``y``. ``or`` - Return true if the left or the right operand are true. + For ``x or y``, if ``x`` is true, then ``x``, else ``y``. ``not`` - negate a statement (see below). + Negate a statement (see below). ``(expr)`` Parentheses group an expression.