]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use a list comprehension instead of list(filter()).
authorGeorg Brandl <georg@python.org>
Sun, 27 Jan 2008 18:16:00 +0000 (18:16 +0000)
committerGeorg Brandl <georg@python.org>
Sun, 27 Jan 2008 18:16:00 +0000 (18:16 +0000)
Lib/pydoc.py

index 0542fa5348fae94be1e650e53f9e312e42770117..755d51a6a9597d31602a52dae3cc2c2c48f2502f 100755 (executable)
@@ -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)]