summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:55:29 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-04-28 04:55:29 (GMT)
commit60811c215fa3b16a4096461d1ef0f855497bb875 (patch)
tree5b9b3c1b5749aca9d5f57465376280b7adc80932 /Lib/pydoc.py
parent121bf6aa61242b12f0897d7d3e049ed6b778f4ff (diff)
parent44aad855ddb0fed3a76c839598a9c3be31d0b7cb (diff)
downloadcpython-60811c215fa3b16a4096461d1ef0f855497bb875.zip
cpython-60811c215fa3b16a4096461d1ef0f855497bb875.tar.gz
cpython-60811c215fa3b16a4096461d1ef0f855497bb875.tar.bz2
#11926: merge with 3.2.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 8e14ee7..8581d63 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1579,6 +1579,9 @@ class Helper:
# in Doc/ and copying the output file into the Lib/ directory.
keywords = {
+ 'False': '',
+ 'None': '',
+ 'True': '',
'and': 'BOOLEAN',
'as': 'with',
'assert': ('assert', ''),
@@ -1794,6 +1797,9 @@ has the same effect as typing a particular string at the help> prompt.
elif request[:8] == 'modules ':
self.listmodules(request.split()[1])
elif request in self.symbols: self.showsymbol(request)
+ elif request in ['True', 'False', 'None']:
+ # special case these keywords since they are objects too
+ doc(eval(request), 'Help on %s:')
elif request in self.keywords: self.showtopic(request)
elif request in self.topics: self.showtopic(request)
elif request: doc(request, 'Help on %s:', output=self._output)