Matti Picus avatar Matti Picus committed af96d10

remove redundant code

Comments (0)

Files changed (2)


     def __init__(self, arr, ofs=0, dtype=None):
         self.value = arr # we have to keep array alive
         self.ofs = ofs
-        if not dtype:
-            dtype = arr.dtype
         self.dtype = dtype
     def get_dtype(self, space):


     T = lltype.Char
     BoxType = interp_boxes.W_StringBox
-    @specialize.argtype(1)
-    def box(self, value):
-        return self.BoxType(rffi.cast(self.T, value), 0, None)
     def _coerce(self, space, w_item):
         return, w_item)))
         return interp_boxes.W_VoidBox(arr, 0, arr.dtype)
-    def store(self, arr, i, ofs, box):
+    def store(self, value, i, ofs, box):
         assert isinstance(box, interp_boxes.W_VoidBox)
         for k in range(self.get_element_size()):
-  [k + i] =[k + box.ofs]
+  [k + i] =[k + box.ofs]
     def str_format(self, box):
                 first = False
                 pieces.append(", ")
-            pieces.append(tp.str_format(, box.ofs, ofs)))
+            pieces.append(tp.str_format(, box.ofs, ofs)))
         return "".join(pieces)
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.