Use a list comprehension instead of list(filter()).
This commit is contained in:
parent
06b1ab8ed0
commit
661b0a15d7
@ -1983,9 +1983,8 @@ def serve(port, callback=None, completer=None):
|
|||||||
'#ffffff', '#7799ee')
|
'#ffffff', '#7799ee')
|
||||||
def bltinlink(name):
|
def bltinlink(name):
|
||||||
return '<a href="%s.html">%s</a>' % (name, name)
|
return '<a href="%s.html">%s</a>' % (name, name)
|
||||||
names = filter(lambda x: x != '__main__',
|
names = [x for x in sys.builtin_module_names if x != '__main__']
|
||||||
sys.builtin_module_names)
|
contents = html.multicolumn(names, bltinlink)
|
||||||
contents = html.multicolumn(list(names), bltinlink)
|
|
||||||
indices = ['<p>' + html.bigsection(
|
indices = ['<p>' + html.bigsection(
|
||||||
'Built-in Modules', '#ffffff', '#ee77aa', contents)]
|
'Built-in Modules', '#ffffff', '#ee77aa', contents)]
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user