summaryrefslogtreecommitdiffstats
path: root/Lib/pydoc.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2010-12-04 10:39:14 (GMT)
committerGeorg Brandl <georg@python.org>2010-12-04 10:39:14 (GMT)
commitcbd2ab1311120efa37e6dd8008a234235bf97b62 (patch)
treeaa1fbd5bf7fc5d236956c4b73cbbd407b9612349 /Lib/pydoc.py
parent8334fd9285a8e9f0864b0453ae738fe3f6893b21 (diff)
downloadcpython-cbd2ab1311120efa37e6dd8008a234235bf97b62.zip
cpython-cbd2ab1311120efa37e6dd8008a234235bf97b62.tar.gz
cpython-cbd2ab1311120efa37e6dd8008a234235bf97b62.tar.bz2
#1513299: cleanup some map() uses where a comprehension works better.
Diffstat (limited to 'Lib/pydoc.py')
-rwxr-xr-xLib/pydoc.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index da3702d..ea282f7 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1000,7 +1000,7 @@ class TextDoc(Doc):
def bold(self, text):
"""Format a string in bold by overstriking."""
- return ''.join(map(lambda ch: ch + '\b' + ch, text))
+ return ''.join(ch + '\b' + ch for ch in text)
def indent(self, text, prefix=' '):
"""Indent text by prepending a given prefix to each line."""
@@ -1024,7 +1024,7 @@ class TextDoc(Doc):
c, bases = entry
result = result + prefix + classname(c, modname)
if bases and bases != (parent,):
- parents = map(lambda c, m=modname: classname(c, m), bases)
+ parents = (classname(c, modname) for c in bases)
result = result + '(%s)' % ', '.join(parents)
result = result + '\n'
elif type(entry) is type([]):