[Python-checkins] r54329 - in python/trunk: Lib/pydoc.py Misc/NEWS
georg.brandl
python-checkins at python.org
Tue Mar 13 11:06:53 CET 2007
Author: georg.brandl
Date: Tue Mar 13 11:06:48 2007
New Revision: 54329
Modified:
python/trunk/Lib/pydoc.py
python/trunk/Misc/NEWS
Log:
Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
pydoc's help keywords.
Modified: python/trunk/Lib/pydoc.py
==============================================================================
--- python/trunk/Lib/pydoc.py (original)
+++ python/trunk/Lib/pydoc.py Tue Mar 13 11:06:48 2007
@@ -1511,6 +1511,7 @@
class Helper:
keywords = {
'and': 'BOOLEAN',
+ 'as': 'with',
'assert': ('ref/assert', ''),
'break': ('ref/break', 'while for'),
'class': ('ref/class', 'CLASSES SPECIALMETHODS'),
@@ -1538,6 +1539,7 @@
'return': ('ref/return', 'FUNCTIONS'),
'try': ('ref/try', 'EXCEPTIONS'),
'while': ('ref/while', 'break continue if TRUTHVALUE'),
+ 'with': ('ref/with', 'CONTEXTMANAGERS EXCEPTIONS yield'),
'yield': ('ref/yield', ''),
}
@@ -1619,6 +1621,7 @@
'LOOPING': ('ref/compound', 'for while break continue'),
'TRUTHVALUE': ('lib/truth', 'if while and or not BASICMETHODS'),
'DEBUGGING': ('lib/module-pdb', 'pdb'),
+ 'CONTEXTMANAGERS': ('ref/context-managers', 'with'),
}
def __init__(self, input, output):
Modified: python/trunk/Misc/NEWS
==============================================================================
--- python/trunk/Misc/NEWS (original)
+++ python/trunk/Misc/NEWS Tue Mar 13 11:06:48 2007
@@ -168,6 +168,9 @@
Library
-------
+- Patch #1542681: add entries for "with", "as" and "CONTEXTMANAGERS" to
+ pydoc's help keywords.
+
- Patch #1555098: use str.join() instead of repeated string
concatenation in robotparser.
More information about the Python-checkins
mailing list