diff --git a/Lib/idlelib/AutoComplete.py b/Lib/idlelib/AutoComplete.py index 72f221cae07..1bc33012f86 100644 --- a/Lib/idlelib/AutoComplete.py +++ b/Lib/idlelib/AutoComplete.py @@ -189,7 +189,7 @@ def fetch_completions(self, what, mode): smalll = eval("__all__", namespace) smalll.sort() else: - smalll = filter(lambda s: s[:1] != '_', bigl) + smalll = [s for s in bigl if s[:1] != '_'] else: try: entity = self.get_entity(what) @@ -199,7 +199,7 @@ def fetch_completions(self, what, mode): smalll = entity.__all__ smalll.sort() else: - smalll = filter(lambda s: s[:1] != '_', bigl) + smalll = [s for s in bigl if s[:1] != '_'] except: return [], [] @@ -210,7 +210,7 @@ def fetch_completions(self, what, mode): expandedpath = os.path.expanduser(what) bigl = os.listdir(expandedpath) bigl.sort() - smalll = filter(lambda s: s[:1] != '.', bigl) + smalll = [s for s in bigl if s[:1] != '.'] except OSError: return [], []