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.