https://github.com/python/cpython/commit/04c7edf669579e8f61c0974d36d12d5555334238
commit: 04c7edf669579e8f61c0974d36d12d5555334238
branch: 3.15
author: Miss Islington (bot) <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-11-05T21:39:17Z
summary:

[3.15] gh-161414: Remove the backquote from the `pydoc` symbols (GH-161416) 
(#161438)

(cherry picked from commit d003448092a043f7bd4b604b210bd682910de6d6)

Co-authored-by: AndrĂ©s Delfino <[email protected]>
Co-authored-by: sobolevn <[email protected]>
Co-authored-by: Stan Ulbrych <[email protected]>

files:
A Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst
M Lib/pydoc.py
M Lib/test/test_pydoc/test_pydoc.py

diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index b5344d76ded294b..24d1772e320f1e4 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1886,7 +1886,6 @@ class Helper:
         ':=': 'ASSIGNMENTEXPRESSIONS',
         '_': 'PRIVATENAMES',
         '__': 'PRIVATENAMES SPECIALMETHODS',
-        '`': 'BACKQUOTES',
         '(': 'TUPLES FUNCTIONS CALLS',
         ')': 'TUPLES FUNCTIONS CALLS',
         '[': 'LISTS SUBSCRIPTS SLICINGS',
diff --git a/Lib/test/test_pydoc/test_pydoc.py 
b/Lib/test/test_pydoc/test_pydoc.py
index 9cb7f662387f6fb..3f39fb64afbd11e 100644
--- a/Lib/test/test_pydoc/test_pydoc.py
+++ b/Lib/test/test_pydoc/test_pydoc.py
@@ -2200,6 +2200,14 @@ def test_keywords(self):
         self.assertEqual(sorted(pydoc.Helper.keywords),
                          sorted(keyword.kwlist + ['case', 'match', 'lazy']))
 
+    def test_symbols(self):
+        # gh-161414
+        for symbol in pydoc.Helper.symbols:
+            with self.subTest(symbol=symbol):
+                buf = StringIO()
+                pydoc.Helper(output=buf).showsymbol(symbol)
+                self.assertNotIn('no documentation found', buf.getvalue())
+
     def test_interact_empty_line_continues(self):
         # gh-138568: test pressing Enter without input should continue in help 
session
         self.assertEqual(
diff --git 
a/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst 
b/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst
new file mode 100644
index 000000000000000..7536c5c25a13f5b
--- /dev/null
+++ b/Misc/NEWS.d/next/Library/2026-11-05-11-59-58.gh-issue-161414.Xnxe8A.rst
@@ -0,0 +1,2 @@
+Remove the backquote from the symbols listed by :func:`help`, asking for help 
on it reported that no
+documentation was found.

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3//lists/python-checkins.python.org
Member address: [email protected]

Reply via email to