mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
Replace a reduce() with sum().
This commit is contained in:
parent
7cebbf39a9
commit
97aa32b467
1 changed files with 2 additions and 3 deletions
|
@ -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')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue