示例#1
0
def str_rsplit__Rope_None_ANY(space, w_self, w_none, w_maxsplit=-1):
    selfnode = w_self._node
    maxsplit = space.int_w(w_maxsplit)
    res_w = [
        W_RopeObject(node) for node in rope.rsplit_chars(selfnode, maxsplit)
    ]
    return space.newlist(res_w)
示例#2
0
def unicode_rsplit__RopeUnicode_None_ANY(space, w_self, w_none, w_maxsplit):
    selfnode = w_self._node
    maxsplit = space.int_w(w_maxsplit)
    res_w = [W_RopeUnicodeObject(node)
                for node in rope.rsplit_chars(selfnode, maxsplit, _isspace)]
    return space.newlist(res_w)