https://github.com/python/cpython/commit/d003448092a043f7bd4b604b210bd682910de6d6
commit: d003448092a043f7bd4b604b210bd682910de6d6
branch: main
author: AndrĂ©s Delfino <[email protected]>
committer: StanFromIreland <[email protected]>
date: 2026-11-05T17:43:29Z
summary:

gh-161414: Remove the backquote from the `pydoc` symbols (#161416)

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 c0e26efa70e4314..a586d35866b038f 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -2012,7 +2012,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 896d961defe09df..a63530c29058275 100644
--- a/Lib/test/test_pydoc/test_pydoc.py
+++ b/Lib/test/test_pydoc/test_pydoc.py
@@ -2294,6 +2294,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