Commits

Anonymous committed 8be991a

signatures: cut basestring, not a valid annotation

Comments (0)

Files changed (3)

pypy/annotation/model.py

             self.knowntypedata = knowntypedata
 
 class SomeStringOrUnicode(SomeObject):
+    """Base class for shared implementation of SomeString and SomeUnicodeString.
+
+    Cannot be an annotation."""
+
     immutable = True
     can_be_None=False
     no_nul = False  # No NUL character in the string.

pypy/rlib/test/test_signature.py

         return 3.0
     assert getsig(f) == [model.SomeLongFloat(), model.SomeSingleFloat(), model.SomeFloat()]
 
-def test_basestring():
-    @signature(types.basestring(), returns=types.int())
-    def f(u):
-        return len(u)
-    assert getsig(f) == [model.SomeStringOrUnicode(), model.SomeInteger()]
-
 def test_unicode():
     @signature(types.unicode(), returns=types.int())
     def f(u):

pypy/rlib/types.py

     return model.SomeInteger()
 
 
-def basestring():
-    return model.SomeStringOrUnicode()
-
 def unicode():
     return model.SomeUnicodeString()