From: Georg Brandl Date: Mon, 20 Sep 2010 06:29:01 +0000 (+0000) Subject: Mention % as string formatting. X-Git-Tag: v3.2a3~202 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f1d633c386646d83c03934f47ff064847ff2a3da;p=python Mention % as string formatting. --- diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst index 5fb8052231..32df0429a7 100644 --- a/Doc/reference/expressions.rst +++ b/Doc/reference/expressions.rst @@ -1300,6 +1300,7 @@ groups from right to left). | ``+``, ``-`` | Addition and subtraction | +-----------------------------------------------+-------------------------------------+ | ``*``, ``/``, ``//``, ``%`` | Multiplication, division, remainder | +| | [#]_ | +-----------------------------------------------+-------------------------------------+ | ``+x``, ``-x``, ``~x`` | Positive, negative, bitwise NOT | +-----------------------------------------------+-------------------------------------+ @@ -1342,5 +1343,7 @@ groups from right to left). the :keyword:`is` operator, like those involving comparisons between instance methods, or constants. Check their documentation for more info. +.. [#] The ``%`` is also used for string formatting; the same precedence applies. + .. [#] The power operator ``**`` binds less tightly than an arithmetic or bitwise unary operator on its right, that is, ``2**-1`` is ``0.5``.