[pypy-svn] rev 949 - pypy/trunk/src/pypy/objspace/std

tomek at codespeak.net tomek at codespeak.net
Sun Jun 22 15:19:42 CEST 2003


Author: tomek
Date: Sun Jun 22 15:19:41 2003
New Revision: 949

Modified:
   pypy/trunk/src/pypy/objspace/std/stringobject.py
   pypy/trunk/src/pypy/objspace/std/typeobject.py
Log:
I reverted the changes on typeobject.py, so there are no changes of my on typeobject.py


Modified: pypy/trunk/src/pypy/objspace/std/stringobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/stringobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/stringobject.py	Sun Jun 22 15:19:41 2003
@@ -213,7 +213,7 @@
         res = [' '] * reslen
 
         pos = 0
-        #fill in the string buffer"
+        #fill in the string buffer
         for w_item in list:
             item = u(w_item)
             if firstelem:
@@ -245,7 +245,7 @@
     if d>0:
         u_self = d * ' ' + u_self
         
-    return W_StringObject(space, u_self)
+    return space.wrap(u_self)
 
 
 def str_ljust__String_ANY(space, w_self, w_arg):
@@ -258,7 +258,7 @@
     if d>0:
         u_self += d * ' '
         
-    return W_StringObject(space, u_self)
+    return space.wrap(u_self)
 
 def str_find__String_String_Int_Int(space, w_self, w_sub, w_start=None, w_end=None):
     start = space.unwrap(w_start)
@@ -302,7 +302,7 @@
     while u_self[rpos - 1] == ' ':
        rpos -= 1
        
-    return W_StringObject(space, u_self[lpos:rpos])
+    return space.wrap(u_self[lpos:rpos])
    
    
      
@@ -314,7 +314,7 @@
     while u_self[rpos - 1] == ' ':
        rpos -= 1
        
-    return W_StringObject(space, u_self[:rpos])
+    return space.wrap(u_self[:rpos])
    
      
     
@@ -325,7 +325,7 @@
     while u_self[lpos] == ' ':
        lpos += 1
             
-    return W_StringObject(space, u_self[lpos:])
+    return space.wrap(u_self[lpos:])
    
  
 

Modified: pypy/trunk/src/pypy/objspace/std/typeobject.py
==============================================================================
--- pypy/trunk/src/pypy/objspace/std/typeobject.py	(original)
+++ pypy/trunk/src/pypy/objspace/std/typeobject.py	Sun Jun 22 15:19:41 2003
@@ -59,10 +59,7 @@
     def lookup_exactly_here(w_self, w_key):
         space = w_self.space
         key = space.unwrap(w_key)
-        #assert isinstance(key, str)
-        #XXX it's actually not true, because the unwraped string is
-        #a CharArray - a structure with length and char buffer,
-        #which can be quite simple mapped to a C implementation
+        assert isinstance(key, str)
         try:
             code = w_self.multimethods[key]
         except KeyError:


More information about the Pypy-commit mailing list