Kaydet (Commit) f2335a9d authored tarafından Kurt B. Kaiser's avatar Kurt B. Kaiser

Fix filter() issues

üst 283f3ffc
...@@ -189,7 +189,7 @@ class AutoComplete: ...@@ -189,7 +189,7 @@ class AutoComplete:
smalll = eval("__all__", namespace) smalll = eval("__all__", namespace)
smalll.sort() smalll.sort()
else: else:
smalll = filter(lambda s: s[:1] != '_', bigl) smalll = [s for s in bigl if s[:1] != '_']
else: else:
try: try:
entity = self.get_entity(what) entity = self.get_entity(what)
...@@ -199,7 +199,7 @@ class AutoComplete: ...@@ -199,7 +199,7 @@ class AutoComplete:
smalll = entity.__all__ smalll = entity.__all__
smalll.sort() smalll.sort()
else: else:
smalll = filter(lambda s: s[:1] != '_', bigl) smalll = [s for s in bigl if s[:1] != '_']
except: except:
return [], [] return [], []
...@@ -210,7 +210,7 @@ class AutoComplete: ...@@ -210,7 +210,7 @@ class AutoComplete:
expandedpath = os.path.expanduser(what) expandedpath = os.path.expanduser(what)
bigl = os.listdir(expandedpath) bigl = os.listdir(expandedpath)
bigl.sort() bigl.sort()
smalll = filter(lambda s: s[:1] != '.', bigl) smalll = [s for s in bigl if s[:1] != '.']
except OSError: except OSError:
return [], [] return [], []
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment