diff options
author | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2003-02-27 20:14:51 (GMT) |
commit | 68468eba635570400f607e140425a222018e56f9 (patch) | |
tree | 2176c8822392383a88caa0a2209a1d2f3446d45c /Lib/pstats.py | |
parent | f389c7727362321a91dbaff13b7e1cef6cbaa3d8 (diff) | |
download | cpython-68468eba635570400f607e140425a222018e56f9.zip cpython-68468eba635570400f607e140425a222018e56f9.tar.gz cpython-68468eba635570400f607e140425a222018e56f9.tar.bz2 |
Get rid of many apply() calls.
Diffstat (limited to 'Lib/pstats.py')
-rw-r--r-- | Lib/pstats.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/pstats.py b/Lib/pstats.py index d36dc9e..62854a8 100644 --- a/Lib/pstats.py +++ b/Lib/pstats.py @@ -76,7 +76,7 @@ class Stats: arg = args[0] args = args[1:] self.init(arg) - apply(self.add, args) + self.add(*args) def init(self, arg): self.all_callees = None # calc only if needed @@ -134,7 +134,7 @@ class Stats: def add(self, *arg_list): if not arg_list: return self - if len(arg_list) > 1: apply(self.add, arg_list[1:]) + if len(arg_list) > 1: self.add(*arg_list[1:]) other = arg_list[0] if type(self) != type(other) or self.__class__ != other.__class__: other = Stats(other) @@ -528,7 +528,7 @@ if __name__ == '__main__': pass processed.append(term) if self.stats: - apply(getattr(self.stats, fn), processed) + getattr(self.stats, fn)(*processed) else: print "No statistics object is loaded." return 0 @@ -594,7 +594,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()): - apply(self.stats.sort_stats, line.split()) + self.stats.sort_stats(*line.split()) else: print "Valid sort keys (unique prefixes are accepted):" for (key, value) in Stats.sort_arg_dict_default.iteritems(): |