summaryrefslogtreecommitdiffstats
path: root/Tools/pybench/With.py
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-05-16 17:02:34 (GMT)
committerGeorg Brandl <georg@python.org>2008-05-16 17:02:34 (GMT)
commitbf82e374ee737992235cbe944c9ddbd58236a892 (patch)
treef8c8dccaa76d58f9cb7d8cc0abb1355be75ee369 /Tools/pybench/With.py
parentacbca71ea775fc488bead0876d0cdbd48670dcbc (diff)
downloadcpython-bf82e374ee737992235cbe944c9ddbd58236a892.zip
cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.gz
cpython-bf82e374ee737992235cbe944c9ddbd58236a892.tar.bz2
More 2to3 fixes in the Tools directory. Fixes #2893.
Diffstat (limited to 'Tools/pybench/With.py')
-rw-r--r--Tools/pybench/With.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/Tools/pybench/With.py b/Tools/pybench/With.py
index 3af24cc..5f59e8c 100644
--- a/Tools/pybench/With.py
+++ b/Tools/pybench/With.py
@@ -17,7 +17,7 @@ class WithFinally(Test):
cm = self.ContextManager()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
with cm: pass
with cm: pass
with cm: pass
@@ -43,7 +43,7 @@ class WithFinally(Test):
cm = self.ContextManager()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
pass
@@ -65,7 +65,7 @@ class TryFinally(Test):
cm = self.ContextManager()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
cm.__enter__()
try: pass
finally: cm.__exit__()
@@ -150,7 +150,7 @@ class TryFinally(Test):
cm = self.ContextManager()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
pass
@@ -171,12 +171,12 @@ class WithRaiseExcept(Test):
error = ValueError
be = self.BlockExceptions()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
with be: raise error
with be: raise error
- with be: raise error,"something"
- with be: raise error,"something"
- with be: raise error,"something"
+ with be: raise error("something")
+ with be: raise error("something")
+ with be: raise error("something")
with be: raise error("something")
with be: raise error("something")
with be: raise error("something")
@@ -186,5 +186,5 @@ class WithRaiseExcept(Test):
error = ValueError
be = self.BlockExceptions()
- for i in xrange(self.rounds):
+ for i in range(self.rounds):
pass