From: Raymond Hettinger Date: Wed, 22 Oct 2003 16:49:01 +0000 (+0000) Subject: Replace a reduce() with sum(). X-Git-Tag: v2.4a1~1388 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=97aa32b467e6955d8b71648579b184e4a3172ca5;p=python Replace a reduce() with sum(). --- diff --git a/Lib/profile.py b/Lib/profile.py index 7c4b5a6d34..f8d20251fa 100755 --- a/Lib/profile.py +++ b/Lib/profile.py @@ -184,9 +184,8 @@ class Profile: # the timer() result contains two values in all # cases. import operator - def get_time_timer(timer=timer, - reduce=reduce, reducer=operator.add): - return reduce(reducer, timer(), 0) + def get_time_timer(timer=timer, sum=sum): + return sum(timer()) self.get_time = get_time_timer self.t = self.get_time() self.simulate_call('profiler')