[Python-checkins] r79604 - in python/branches/py3k: Lib/pstats.py

andrew.kuchling python-checkins at python.org
Fri Apr 2 19:02:57 CEST 2010


Author: andrew.kuchling
Date: Fri Apr  2 19:02:57 2010
New Revision: 79604

Log:
Merged revisions 79603 via svnmerge from 
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
........


Modified:
   python/branches/py3k/   (props changed)
   python/branches/py3k/Lib/pstats.py

Modified: python/branches/py3k/Lib/pstats.py
==============================================================================
--- python/branches/py3k/Lib/pstats.py	(original)
+++ python/branches/py3k/Lib/pstats.py	Fri Apr  2 19:02:57 2010
@@ -636,7 +636,7 @@
 
         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)


More information about the Python-checkins mailing list