]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92966)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Thu, 19 May 2022 15:32:54 +0000 (08:32 -0700)
committerGitHub <noreply@github.com>
Thu, 19 May 2022 15:32:54 +0000 (17:32 +0200)
(cherry picked from commit fb082c2fc5a925085b179e63ca10b7f60b356d2f)

Co-authored-by: Zackery Spytz <zspytz@gmail.com>
Doc/reference/expressions.rst
Misc/NEWS.d/next/Library/2022-02-09-23-44-27.bpo-45393.9v5Y8U.rst [new file with mode: 0644]

index f77927d86d9d661ea3d5ded5fb0f9080bd53007f..1f8b08f70d504e5b5311e054c1bcce388d1fa5e2 100644 (file)
@@ -1891,7 +1891,7 @@ precedence and have a left-to-right chaining feature as described in the
 | ``x[index]``, ``x[index:index]``,             | Subscription, slicing,              |
 | ``x(arguments...)``, ``x.attribute``          | call, attribute reference           |
 +-----------------------------------------------+-------------------------------------+
-| :keyword:`await` ``x``                        | Await expression                    |
+| :keyword:`await x <await>`                    | Await expression                    |
 +-----------------------------------------------+-------------------------------------+
 | ``**``                                        | Exponentiation [#]_                 |
 +-----------------------------------------------+-------------------------------------+
@@ -1915,7 +1915,7 @@ precedence and have a left-to-right chaining feature as described in the
 | :keyword:`is`, :keyword:`is not`, ``<``,      | tests and identity tests            |
 | ``<=``, ``>``, ``>=``, ``!=``, ``==``         |                                     |
 +-----------------------------------------------+-------------------------------------+
-| :keyword:`not` ``x``                          | Boolean NOT                         |
+| :keyword:`not x <not>`                        | Boolean NOT                         |
 +-----------------------------------------------+-------------------------------------+
 | :keyword:`and`                                | Boolean AND                         |
 +-----------------------------------------------+-------------------------------------+
diff --git a/Misc/NEWS.d/next/Library/2022-02-09-23-44-27.bpo-45393.9v5Y8U.rst b/Misc/NEWS.d/next/Library/2022-02-09-23-44-27.bpo-45393.9v5Y8U.rst
new file mode 100644 (file)
index 0000000..0a239b0
--- /dev/null
@@ -0,0 +1,2 @@
+Fix the formatting for ``await x`` and ``not x`` in the operator precedence
+table when using the :func:`help` system.