Commits

Manuel Jacob committed 705202f

Add fast path for app-level str.lower() and str.upper().

  • Participants
  • Parent commits ec53889
  • Branches refactor-str-types

Comments (0)

Files changed (1)

pypy/objspace/std/bytesobject.py

             return self_as_uni._new(res)
         return self._StringMethods_descr_replace(space, w_old, w_new, count)
 
+    def descr_lower(self, space):
+        return W_BytesObject(self._value.lower())
+
+    def descr_upper(self, space):
+        return W_BytesObject(self._value.upper())
+
     def _join_return_one(self, space, w_obj):
         return (space.is_w(space.type(w_obj), space.w_str) or
                 space.is_w(space.type(w_obj), space.w_unicode))