diff options
author | Andrew M. Kuchling <amk@amk.ca> | 2010-04-02 16:59:16 (GMT) |
---|---|---|
committer | Andrew M. Kuchling <amk@amk.ca> | 2010-04-02 16:59:16 (GMT) |
commit | d54e699cba4abab087bfd625a1fec8b6571ea042 (patch) | |
tree | ab5f05c86e908b186a2e87d1727e4c4f066004d1 /Lib | |
parent | d44b2fc87c2d9bd9e390eb54d50306959d80ba87 (diff) | |
download | cpython-d54e699cba4abab087bfd625a1fec8b6571ea042.zip cpython-d54e699cba4abab087bfd625a1fec8b6571ea042.tar.gz cpython-d54e699cba4abab087bfd625a1fec8b6571ea042.tar.bz2 |
#4440: modernize a use of filter(), making it compatible with 3.x
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/pstats.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index 6beb0b3..0effa1c 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -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):" |