[pypy-commit] pypy numpy-dtype-strings: Remove FakeSpace string code no longer needed

jterrace noreply at buildbot.pypy.org
Mon Dec 12 22:52:56 CET 2011


Author: Jeff Terrace <jterrace at gmail.com>
Branch: numpy-dtype-strings
Changeset: r50451:cf42a69ca368
Date: 2011-12-12 16:49 -0500
http://bitbucket.org/pypy/pypy/changeset/cf42a69ca368/

Log:	Remove FakeSpace string code no longer needed

diff --git a/pypy/module/micronumpy/compile.py b/pypy/module/micronumpy/compile.py
--- a/pypy/module/micronumpy/compile.py
+++ b/pypy/module/micronumpy/compile.py
@@ -48,7 +48,6 @@
     w_long = "long"
     w_tuple = 'tuple'
     w_slice = "slice"
-    w_str = "str"
 
     def __init__(self):
         """NOT_RPYTHON"""
@@ -86,8 +85,6 @@
             return BoolObject(obj)
         elif isinstance(obj, int):
             return IntObject(obj)
-        elif isinstance(obj, str):
-            return StringObject(obj)
         elif isinstance(obj, W_Root):
             return obj
         raise NotImplementedError
@@ -123,16 +120,6 @@
         assert isinstance(w_obj, interp_boxes.W_GenericBox)
         return self.int(w_obj.descr_int(self))
 
-    def str_w(self, w_obj):
-        if isinstance(w_obj, StringObject):
-            return w_obj._value
-        raise NotImplementedError
-    
-    def str(self, w_obj):
-        if isinstance(w_obj, StringObject):
-            return w_obj
-        raise NotImplementedError
-
     def is_true(self, w_obj):
         assert isinstance(w_obj, BoolObject)
         return w_obj.boolval
@@ -182,11 +169,6 @@
     def __init__(self, intval):
         self.intval = intval
 
-class StringObject(W_Root):
-    tp = FakeSpace.w_str
-    def __init__(self, s):
-        self._value = s
-
 class ListObject(W_Root):
     tp = FakeSpace.w_list
     def __init__(self, items):


More information about the pypy-commit mailing list