[pypy-svn] r65743 - in pypy/trunk/pypy: annotation rpython/test

benjamin at codespeak.net benjamin at codespeak.net
Fri Jun 12 02:36:15 CEST 2009


Author: benjamin
Date: Fri Jun 12 02:36:12 2009
New Revision: 65743

Modified:
   pypy/trunk/pypy/annotation/unaryop.py
   pypy/trunk/pypy/rpython/test/test_runicode.py
Log:
don't support splitlines() on unicode

Modified: pypy/trunk/pypy/annotation/unaryop.py
==============================================================================
--- pypy/trunk/pypy/annotation/unaryop.py	(original)
+++ pypy/trunk/pypy/annotation/unaryop.py	Fri Jun 12 02:36:12 2009
@@ -493,13 +493,6 @@
     def hash(str):
         return SomeInteger()
 
-    def method_splitlines(str, s_keep_newlines=None):
-        s_list = getbookkeeper().newlist(str.basestringclass())
-        # Force the list to be resizable because ll_splitlines doesn't
-        # preallocate the list.
-        s_list.listdef.listitem.resize()
-        return s_list
-
     def method_split(str, patt): # XXX
         getbookkeeper().count("str_split", str, patt)
         return getbookkeeper().newlist(str.basestringclass())
@@ -528,6 +521,13 @@
     def method_lower(str):
         return SomeString()
 
+    def method_splitlines(str, s_keep_newlines=None):
+        s_list = getbookkeeper().newlist(str.basestringclass())
+        # Force the list to be resizable because ll_splitlines doesn't
+        # preallocate the list.
+        s_list.listdef.listitem.resize()
+        return s_list
+
     def method_decode(str, s_enc):
         if not s_enc.is_constant():
             raise TypeError("Non-constant encoding not supported")

Modified: pypy/trunk/pypy/rpython/test/test_runicode.py
==============================================================================
--- pypy/trunk/pypy/rpython/test/test_runicode.py	(original)
+++ pypy/trunk/pypy/rpython/test/test_runicode.py	Fri Jun 12 02:36:12 2009
@@ -200,6 +200,7 @@
     test_char_isxxx = unsupported
     test_upper = unsupported
     test_lower = unsupported
+    test_splitlines = unsupported
     test_strformat = unsupported
     test_strformat_instance = unsupported
     test_strformat_nontuple = unsupported



More information about the Pypy-commit mailing list