Commits

Laurence Tratt committed 422d7a1

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.

  • Participants
  • Parent commits b80e739
  • Branches more_strategies

Comments (0)

Files changed (1)

File pypy/objspace/std/listobject.py

                     # 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)
 
 
             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):