#4440: modernize a use of filter(), making it compatible with 3.x

This commit is contained in:
Andrew M. Kuchling 2010-04-02 16:59:16 +00:00
parent d44b2fc87c
commit d54e699cba
1 changed files with 1 additions and 1 deletions

View File

@ -649,7 +649,7 @@ if __name__ == '__main__':
def do_sort(self, line):
abbrevs = self.stats.get_sort_arg_defs()
if line and not filter(lambda x,a=abbrevs: x not in a,line.split()):
if line and all((x in abbrevs) for x in line.split()):
self.stats.sort_stats(*line.split())
else:
print >> self.stream, "Valid sort keys (unique prefixes are accepted):"