summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-01-27 18:16:00 (GMT)
committerGeorg Brandl <georg@python.org>2008-01-27 18:16:00 (GMT)
commit661b0a15d78b8e86ea4b458550b1cb04f0988424 (patch)
treef74bf4ef755f087fa235633ff0889576c9222229 /Lib
parent06b1ab8ed0400a868c78a33f1e8697519eea6a18 (diff)
downloadcpython-661b0a15d78b8e86ea4b458550b1cb04f0988424.zip
cpython-661b0a15d78b8e86ea4b458550b1cb04f0988424.tar.gz
cpython-661b0a15d78b8e86ea4b458550b1cb04f0988424.tar.bz2
Use a list comprehension instead of list(filter()).
Diffstat (limited to 'Lib')
-rwxr-xr-xLib/pydoc.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/pydoc.py b/Lib/pydoc.py
index 0542fa5..755d51a 100755
--- a/Lib/pydoc.py
+++ b/Lib/pydoc.py
@@ -1983,9 +1983,8 @@ def serve(port, callback=None, completer=None):
'#ffffff', '#7799ee')
def bltinlink(name):
return '<a href="%s.html">%s</a>' % (name, name)
- names = filter(lambda x: x != '__main__',
- sys.builtin_module_names)
- contents = html.multicolumn(list(names), bltinlink)
+ names = [x for x in sys.builtin_module_names if x != '__main__']
+ contents = html.multicolumn(names, bltinlink)
indices = ['<p>' + html.bigsection(
'Built-in Modules', '#ffffff', '#ee77aa', contents)]