Commits

Philip Jenvey  committed fd0ccfa

translation fixes

  • Participants
  • Parent commits bfeb762
  • Branches py3k

Comments (0)

Files changed (2)

File pypy/module/micronumpy/interp_boxes.py

 
 class W_VoidBox(W_FlexibleBox):
     def descr_getitem(self, space, w_item):
-        if space.isinstance_w(w_item, space.w_basestring):
+        if (space.isinstance_w(w_item, space.w_unicode) or
+            space.isinstance_w(w_item, space.w_bytes)):
             item = space.str_w(w_item)
         elif space.isinstance_w(w_item, space.w_int):
             indx = space.int_w(w_item)

File pypy/module/micronumpy/interp_dtype.py

         if self.fields is None:
             raise OperationError(space.w_KeyError, space.wrap(
                 "There are no fields in dtype %s." % self.name))
-        if space.isinstance_w(w_item, space.w_basestring):
+        if (space.isinstance_w(w_item, space.w_unicode) or
+            space.isinstance_w(w_item, space.w_bytes)):
             item = space.str_w(w_item)
         elif space.isinstance_w(w_item, space.w_int):
             indx = space.int_w(w_item)