[Python-checkins] r79603 - python/trunk/Lib/pstats.py
andrew.kuchling
python-checkins at python.org
Fri Apr 2 18:59:16 CEST 2010
Author: andrew.kuchling
Date: Fri Apr 2 18:59:16 2010
New Revision: 79603
Log:
#4440: modernize a use of filter(), making it compatible with 3.x
Modified:
python/trunk/Lib/pstats.py
Modified: python/trunk/Lib/pstats.py
==============================================================================
--- python/trunk/Lib/pstats.py (original)
+++ python/trunk/Lib/pstats.py Fri Apr 2 18:59:16 2010
@@ -649,7 +649,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 >> self.stream, "Valid sort keys (unique prefixes are accepted):"
More information about the Python-checkins
mailing list