summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorEmily Morehouse <emily@python.org>2024-09-27 20:59:26 (GMT)
committerGitHub <noreply@github.com>2024-09-27 20:59:26 (GMT)
commit626668912f3102a96d3f251f5304ad2f8326f3cc (patch)
treeb6de3e3db719f12f8dcd946697944e4bd93a596c /Lib/pydoc.py
parent6cba6e1df2c20846347b705eff7fb28caeeb17fd (diff)
downloadcpython-626668912f3102a96d3f251f5304ad2f8326f3cc.zip
cpython-626668912f3102a96d3f251f5304ad2f8326f3cc.tar.gz
cpython-626668912f3102a96d3f251f5304ad2f8326f3cc.tar.bz2
gh-81263: Add assignment expressions to `help` (#124641)
* Add assignment expression (:=) to `help` * Update index for Assignment Expressions to include pair of `assignment; expression`
Diffstat (limited to 'Lib/pydoc.py')
-rw-r--r--Lib/pydoc.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index d376592..eec7b07 100644
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1870,6 +1870,7 @@ class Helper:
':': 'SLICINGS DICTIONARYLITERALS',
'@': 'def class',
'\\': 'STRINGS',
+ ':=': 'ASSIGNMENTEXPRESSIONS',
'_': 'PRIVATENAMES',
'__': 'PRIVATENAMES SPECIALMETHODS',
'`': 'BACKQUOTES',
@@ -1963,6 +1964,7 @@ class Helper:
'ASSERTION': 'assert',
'ASSIGNMENT': ('assignment', 'AUGMENTEDASSIGNMENT'),
'AUGMENTEDASSIGNMENT': ('augassign', 'NUMBERMETHODS'),
+ 'ASSIGNMENTEXPRESSIONS': ('assignment-expressions', ''),
'DELETION': 'del',
'RETURNING': 'return',
'IMPORTING': 'import',