mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Fix filter() issues
This commit is contained in:
parent
283f3ffc24
commit
f2335a9da0
1 changed files with 3 additions and 3 deletions
|
@ -189,7 +189,7 @@ class AutoComplete:
|
|||
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 @@ class AutoComplete:
|
|||
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 @@ class AutoComplete:
|
|||
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 [], []
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue