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

tomek at codespeak.net tomek at codespeak.net
Thu May 29 17:12:07 CEST 2003


Author: tomek
Date: Thu May 29 17:12:06 2003
New Revision: 693

Modified:
   pypy/trunk/src/pypy/objspace/std/stringobject.py
Log:

ok


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	Thu May 29 17:12:06 2003
@@ -142,10 +142,11 @@
             else:
                 min_len = str1.len
 
+            c = 0
             idx = 0
             if (min_len > 0):
                 while (c == 0) and (idx < min_len):
-                    c = ord(str1.charat[idx]) - ord(str2.charat[idx])
+                    c = ord(str1.charat(idx)) - ord(str2.charat(idx))
                     idx = idx + 1
             else:
                 c = 0
@@ -153,7 +154,7 @@
         if (c == 0):
             if str1.len < str2.len:
                 c = -1
-            elif str1.len > str2.leb:
+            elif str1.len > str2.len:
                 c = 1
             else:
                 c = 0
@@ -165,7 +166,7 @@
         elif op == NE:
             return space.newbool(c != 0)
         elif op == GT:
-            return space.newbook(c > 0)
+            return space.newbool(c > 0)
         elif op == GE:
             return space.newbool(c >= 0)
         else:


More information about the Pypy-commit mailing list