Use a list comprehension instead of list(filter()).

This commit is contained in:
Georg Brandl 2008-01-27 18:16:00 +00:00
parent 06b1ab8ed0
commit 661b0a15d7
1 changed files with 2 additions and 3 deletions

View File

@ -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)]