summaryrefslogtreecommitdiffstats
path: root/Lib/profile.py
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-10-22 16:49:01 (GMT)
committerRaymond Hettinger <python@rcn.com>2003-10-22 16:49:01 (GMT)
commit97aa32b467e6955d8b71648579b184e4a3172ca5 (patch)
tree0b3df8e0c372e2da0d3fd63dee3f07ee5af5f49b /Lib/profile.py
parent7cebbf39a9df7bdde0ed2da314e6f651e114e22b (diff)
downloadcpython-97aa32b467e6955d8b71648579b184e4a3172ca5.zip
cpython-97aa32b467e6955d8b71648579b184e4a3172ca5.tar.gz
cpython-97aa32b467e6955d8b71648579b184e4a3172ca5.tar.bz2
Replace a reduce() with sum().
Diffstat (limited to 'Lib/profile.py')
-rwxr-xr-xLib/profile.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/profile.py b/Lib/profile.py
index 7c4b5a6..f8d2025 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')