'with_doc_4(int a, str b, list c) -> str\n\n Existing string\n '
>>> f_sd.__doc__
- "f_sd(str s=u'spam')"
+ "f_sd(str s='spam')"
>>> cf_sd.__doc__
- "cf_sd(str s=u'spam') -> str"
+ "cf_sd(str s='spam') -> str"
>>> types.__doc__
'types(Ext a, int b, unsigned short c, float d, e)'
"""
return b
-def f_sd(str s=u'spam'):
+def f_sd(str s='spam'):
return s
-cpdef str cf_sd(str s=u'spam'):
+cpdef str cf_sd(str s='spam'):
return s
cpdef char f_c(char c):
b = b"abc"
assert typeof(b) == "char *", typeof(b)
s = "abc"
- assert typeof(s) == "Python object", typeof(s)
+ assert typeof(s) == "str object", typeof(s)
u = u"xyz"
assert typeof(u) == "unicode object", typeof(u)
L = [1,2,3]
def slice_charp(py_string_arg):
- cdef str py_string = py_string_arg.encode(u'ASCII')
+ cdef bytes py_string = py_string_arg.encode(u'ASCII')
cdef char* s = py_string
return s[1:3].decode(u'ASCII')
def slice_charp_repeat(py_string_arg):
- cdef str py_string = py_string_arg.encode(u'ASCII')
+ cdef bytes py_string = py_string_arg.encode(u'ASCII')
cdef char* s = py_string
- cdef str slice_val = s[1:6]
+ cdef bytes slice_val = s[1:6]
s = slice_val
return s[1:3].decode(u'ASCII')