[Python-checkins] bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92967)

ambv webhook-mailer at python.org
Thu May 19 11:33:14 EDT 2022


https://github.com/python/cpython/commit/9f7cdb2cf70d8b6ed95715317e5e98f0cca8fed6
commit: 9f7cdb2cf70d8b6ed95715317e5e98f0cca8fed6
branch: 3.9
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: ambv <lukasz at langa.pl>
date: 2022-05-19T17:33:09+02:00
summary:

bpo-45393: help() on operator precedence has misleading entries (GH-31246) (GH-92967)

(cherry picked from commit fb082c2fc5a925085b179e63ca10b7f60b356d2f)

Co-authored-by: Zackery Spytz <zspytz at gmail.com>

files:
A Misc/NEWS.d/next/Library/2022-02-09-23-44-27.bpo-45393.9v5Y8U.rst
M Doc/reference/expressions.rst

diff --git a/Doc/reference/expressions.rst b/Doc/reference/expressions.rst
index 502c022501eff..9f6f6f7d81527 100644
--- a/Doc/reference/expressions.rst
+++ b/Doc/reference/expressions.rst
@@ -1882,7 +1882,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 [#]_                 |
 +-----------------------------------------------+-------------------------------------+
@@ -1906,7 +1906,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
index 0000000000000..0a239b07d76bd
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2022-02-09-23-44-27.bpo-45393.9v5Y8U.rst
@@ -0,0 +1,2 @@
+Fix the formatting for ``await x`` and ``not x`` in the operator precedence
+table when using the :func:`help` system.



More information about the Python-checkins mailing list