Author: Laurence Tratt <[email protected]>
Branch: more_strategies
Changeset: r68325:422d7a1ecc4d
Date: 2013-11-26 15:45 +0000
http://bitbucket.org/pypy/pypy/changeset/422d7a1ecc4d/

Log:    Remove some of the unlikely special cases.

        These don't do any harm, but they are unlikely to trigger very
        often. By common consensus, they're probably better off removed.

diff --git a/pypy/objspace/std/listobject.py b/pypy/objspace/std/listobject.py
--- a/pypy/objspace/std/listobject.py
+++ b/pypy/objspace/std/listobject.py
@@ -1584,9 +1584,6 @@
                     # list.
                     raise ValueError
             return self._safe_find(w_list, intv, start, stop)
-        elif w_objt is W_StringObject or w_objt is W_UnicodeObject \
-          or self.space.type(w_obj).compares_by_identity():
-            raise ValueError
         return ListStrategy.find(self, w_list, w_obj, start, stop)
 
 
@@ -1639,9 +1636,6 @@
             return self._safe_find(w_list, self.unwrap(w_obj), start, stop)
         elif w_objt is W_IntObject or w_objt is W_LongObject:
             return self._safe_find(w_list, w_obj.float_w(self.space), start, 
stop)
-        elif w_objt is W_StringObject or w_objt is W_UnicodeObject \
-          or self.space.type(w_obj).compares_by_identity(): 
-            raise ValueError
         return ListStrategy.find(self, w_list, w_obj, start, stop)
 
     def sort(self, w_list, reverse):
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to