summaryrefslogtreecommitdiff
path: root/bench/env.__setitem__.py
diff options
context:
space:
mode:
authorGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 13:08:12 -0400
committerGary Oberbrunner <garyo@oberbrunner.com>2013-09-22 13:08:12 -0400
commit895990cbd5007876709b93e6d3db2b6c069382ea (patch)
treeb95b2144ccf82d8227cec025af152f4eadfa7282 /bench/env.__setitem__.py
parentf094b77fc68787c61efdc9ca095098c88bf52373 (diff)
downloadscons-895990cbd5007876709b93e6d3db2b6c069382ea.tar.gz
Result of raw 2to3 run (2to3-2.7); checkpoint for python3 conversion.
Diffstat (limited to 'bench/env.__setitem__.py')
-rw-r--r--bench/env.__setitem__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/bench/env.__setitem__.py b/bench/env.__setitem__.py
index b17b59e4..284653e8 100644
--- a/bench/env.__setitem__.py
+++ b/bench/env.__setitem__.py
@@ -33,15 +33,15 @@ class Timing(object):
def times(num=1000000, init='', title='Results:', **statements):
# time each statement
timings = []
- for n, s in statements.items():
+ for n, s in list(statements.items()):
t = Timing(n, num, init, s)
t.timeit()
timings.append(t)
- print
- print title
+ print()
+ print(title)
for i in sorted([(i.getResult(),i.name) for i in timings]):
- print " %9.3f s %s" % i
+ print(" %9.3f s %s" % i)
# Import the necessary local SCons.* modules used by some of our
# alternative implementations below, first manipulating sys.path so
@@ -287,7 +287,7 @@ else:
# that the timer will use to get at these classes.
class_names = []
-for n in locals().keys():
+for n in list(locals().keys()):
#if n.startswith('env_'):
if n[:4] == 'env_':
class_names.append(n)
@@ -339,9 +339,9 @@ def run_it(title, init):
s['init'] = init
times(**s)
-print 'Environment __setitem__ benchmark using',
-print 'Python', sys.version.split()[0],
-print 'on', sys.platform, os.name
+print('Environment __setitem__ benchmark using', end=' ')
+print('Python', sys.version.split()[0], end=' ')
+print('on', sys.platform, os.name)
run_it('Results for re-adding an existing variable name 100 times:',
common_imports + """