Author: Ronan Lamy <[email protected]>
Branch: py3k
Changeset: r84227:abe796ff4415
Date: 2016-05-05 19:14 +0100
http://bitbucket.org/pypy/pypy/changeset/abe796ff4415/
Log: Fix test_stressdict
diff --git a/pypy/objspace/std/dictmultiobject.py
b/pypy/objspace/std/dictmultiobject.py
--- a/pypy/objspace/std/dictmultiobject.py
+++ b/pypy/objspace/std/dictmultiobject.py
@@ -534,11 +534,10 @@
if type(w_key) is self.space.UnicodeObjectCls:
self.switch_to_unicode_strategy(w_dict)
return
- if type(w_key) is W_IntObject:
+ w_type = self.space.type(w_key)
+ if self.space.is_w(w_type, self.space.w_int):
self.switch_to_int_strategy(w_dict)
- return
- w_type = self.space.type(w_key)
- if w_type.compares_by_identity():
+ elif w_type.compares_by_identity():
self.switch_to_identity_strategy(w_dict)
else:
self.switch_to_object_strategy(w_dict)
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit