diff options
author | Steven Knight <knight@baldmt.com> | 2010-04-20 06:00:36 +0000 |
---|---|---|
committer | Steven Knight <knight@baldmt.com> | 2010-04-20 06:00:36 +0000 |
commit | 1b593e214754a93b16c267e28fe04c320f6b2167 (patch) | |
tree | d3f8269d0e8c1d76786aa3a415ba616b18c5d04e /bench | |
parent | e778ba6ff03e4bfca192f1d82d1667f0630b58dc (diff) | |
download | scons-1b593e214754a93b16c267e28fe04c320f6b2167.tar.gz |
Rewrite uses of reduce(), which is being deprecated for Python 3.x.
Diffstat (limited to 'bench')
-rw-r--r-- | bench/bench.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/bench/bench.py b/bench/bench.py index 2acc29f8..a839ed65 100644 --- a/bench/bench.py +++ b/bench/bench.py @@ -110,7 +110,9 @@ def timer(func, *args, **kw): return results def display(label, results): - total = reduce(lambda x, y: x+y, results, 0.0) + total = 0.0 + for r in results: + total += r print " %8.3f" % ((total * 1e6) / len(results)), ':', label for func in FunctionList: |