# unicode.split(s, [sep, [maxsplit]])
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def split(unicode s):
"""
>>> print_all( text.split() )
"""
return s.split()
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def split_sep(unicode s, sep):
"""
>>> print_all( text.split(sep) )
"//CoerceToPyTypeNode",
"//CastNode", "//TypecastNode")
@cython.test_assert_path_exists(
- "//CoerceFromPyTypeNode")
+ "//CoerceFromPyTypeNode",
+ "//PythonCapiCallNode")
def split_sep_max(unicode s, sep, max):
"""
>>> print_all( text.split(sep, 1) )
@cython.test_fail_if_path_exists(
"//CoerceToPyTypeNode", "//CoerceFromPyTypeNode",
"//CastNode", "//TypecastNode")
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def split_sep_max_int(unicode s, sep):
"""
>>> print_all( text.split(sep, 1) )
# unicode.splitlines(s, [keepends])
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def splitlines(unicode s):
"""
>>> len(multiline_text.splitlines())
"""
return s.splitlines()
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def splitlines_keep(unicode s, keep):
"""
>>> len(multiline_text.splitlines(True))
# boolean conversion isn't currently smart enough for this ...
# "//CoerceToPyTypeNode", "//CoerceFromPyTypeNode",
"//CastNode", "//TypecastNode")
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def splitlines_keep_bint(unicode s):
"""
>>> len(multiline_text.splitlines(True))
pipe_sep = u'|'
+@cython.test_fail_if_path_exists(
+ "//CoerceToPyTypeNode", "//CoerceFromPyTypeNode",
+ "//CastNode", "//TypecastNode")
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def join(unicode sep, l):
"""
>>> l = text.split()
"""
return sep.join(l)
+@cython.test_fail_if_path_exists(
+ "//CoerceToPyTypeNode", "//CoerceFromPyTypeNode",
+ "//CastNode", "//TypecastNode", "//NoneCheckNode")
+@cython.test_assert_path_exists(
+ "//PythonCapiCallNode")
def join_sep(l):
"""
>>> l = text.split()