diff options
author | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
---|---|---|
committer | Gary Oberbrunner <garyo@oberbrunner.com> | 2013-09-22 17:08:12 (GMT) |
commit | 953dc41b8b720fdcec7955de67d23206214e5125 (patch) | |
tree | b95b2144ccf82d8227cec025af152f4eadfa7282 /bench/env.__setitem__.py | |
parent | 328e541f40849c270fc75f0932594d18d2e6340b (diff) | |
download | SCons-953dc41b8b720fdcec7955de67d23206214e5125.zip SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.gz SCons-953dc41b8b720fdcec7955de67d23206214e5125.tar.bz2 |
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__.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/bench/env.__setitem__.py b/bench/env.__setitem__.py index b17b59e..284653e 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 + """ |