summaryrefslogtreecommitdiffstats
path: root/Tools/pybench/Dict.py
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-01-13 23:54:39 (GMT)
committerGuido van Rossum <guido@python.org>2007-01-13 23:54:39 (GMT)
commit5b787e8bc2dbda5583eee039cb6a6e47c8d8a034 (patch)
treebbb5ad7df427ee6ab5032c68dabdac2fcd6d38ee /Tools/pybench/Dict.py
parent16be03e4a206c24b00dc1d2d3c740dffbbfc4ac9 (diff)
downloadcpython-5b787e8bc2dbda5583eee039cb6a6e47c8d8a034.zip
cpython-5b787e8bc2dbda5583eee039cb6a6e47c8d8a034.tar.gz
cpython-5b787e8bc2dbda5583eee039cb6a6e47c8d8a034.tar.bz2
Fix pybench so it works -- Larry Hastings.
Diffstat (limited to 'Tools/pybench/Dict.py')
-rw-r--r--Tools/pybench/Dict.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/Tools/pybench/Dict.py b/Tools/pybench/Dict.py
index 9cdd682..cb039b0 100644
--- a/Tools/pybench/Dict.py
+++ b/Tools/pybench/Dict.py
@@ -351,7 +351,7 @@ class SimpleDictManipulation(Test):
def test(self):
d = {}
- has_key = d.has_key
+ has_key = lambda key: key in d
for i in xrange(self.rounds):
@@ -498,7 +498,7 @@ class SimpleDictManipulation(Test):
def calibrate(self):
d = {}
- has_key = d.has_key
+ has_key = lambda key: key in d
for i in xrange(self.rounds):
pass