[pypy-svn] r56204 - pypy/dist/pypy/objspace/std

arigo at codespeak.net arigo at codespeak.net
Tue Jul 1 18:31:34 CEST 2008


Author: arigo
Date: Tue Jul  1 18:31:33 2008
New Revision: 56204

Modified:
   pypy/dist/pypy/objspace/std/dictmultiobject.py
Log:
Small bug.  Hard to test because it only makes a small performance difference.


Modified: pypy/dist/pypy/objspace/std/dictmultiobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/dictmultiobject.py	(original)
+++ pypy/dist/pypy/objspace/std/dictmultiobject.py	Tue Jul  1 18:31:33 2008
@@ -154,7 +154,8 @@
 
     def get(self, w_lookup):
         space = self.space
-        if not _is_str(space, w_lookup) and not _is_sane_hash(space, w_lookup):
+        if not _is_str(space, w_lookup) and not _is_sane_hash(space,
+                                                        space.type(w_lookup)):
             # give hash a chance to raise an exception
             space.hash(w_lookup)
         return None
@@ -177,7 +178,8 @@
 
     def delitem(self, w_key):
         space = self.space
-        if not _is_str(space, w_key) and not _is_sane_hash(space, w_key):
+        if not _is_str(space, w_key) and not _is_sane_hash(space,
+                                                           space.type(w_key)):
             # count hash
             space.hash(w_key)
         raise KeyError



More information about the Pypy-commit mailing list