]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Merged revisions 79603 via svnmerge from
authorAndrew M. Kuchling <amk@amk.ca>
Fri, 2 Apr 2010 17:02:57 +0000 (17:02 +0000)
committerAndrew M. Kuchling <amk@amk.ca>
Fri, 2 Apr 2010 17:02:57 +0000 (17:02 +0000)
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r79603 | andrew.kuchling | 2010-04-02 12:59:16 -0400 (Fri, 02 Apr 2010) | 1 line

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

Lib/pstats.py

index fe7f225cc1c6f6ebc180609c29b907c3b660d8c2..e2fee37f0a0f53471c5439c139a20ae55bb7b7d3 100644 (file)
@@ -636,7 +636,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("Valid sort keys (unique prefixes are accepted):", file=self.stream)