[pypy-svn] r47285 - pypy/dist/pypy/objspace/std

cfbolz at codespeak.net cfbolz at codespeak.net
Mon Oct 8 14:14:01 CEST 2007


Author: cfbolz
Date: Mon Oct  8 14:13:59 2007
New Revision: 47285

Modified:
   pypy/dist/pypy/objspace/std/unicodeobject.py
Log:
add to asserts for the translator


Modified: pypy/dist/pypy/objspace/std/unicodeobject.py
==============================================================================
--- pypy/dist/pypy/objspace/std/unicodeobject.py	(original)
+++ pypy/dist/pypy/objspace/std/unicodeobject.py	Mon Oct  8 14:13:59 2007
@@ -368,6 +368,7 @@
         while rpos > lpos and u_self[rpos - 1] in u_chars:
            rpos -= 1
            
+    assert rpos >= 0
     result = u_self[lpos: rpos]
     return W_UnicodeObject(result)
 
@@ -386,6 +387,7 @@
         while rpos > lpos and _isspace(u_self[rpos - 1]):
            rpos -= 1
        
+    assert rpos >= 0
     result = u_self[lpos: rpos]
     return W_UnicodeObject(result)
 



More information about the Pypy-commit mailing list