def sliced(space, s, start, stop, orig_obj):
    assert (start >= 0)
    assert (stop >= 0)
    assert (not space.config.objspace.std.withrope)
    if ((start == 0) and (stop == len(s)) and space.is_w(space.type(orig_obj), space.w_str)):
        return orig_obj
    if space.config.objspace.std.withstrslice:
        from pypy.objspace.std.strsliceobject import W_StringSliceObject
        if ((stop - start) > ((len(s) * 0.2) + 40)):
            return W_StringSliceObject(s, start, stop)
    return wrapstr(space, s[start:stop])
def sliced(space, s, start, stop, orig_obj):
    assert (start >= 0)
    assert (stop >= 0)
    assert (not space.config.objspace.std.withrope)
    if ((start == 0) and (stop == len(s)) and space.is_w(space.type(orig_obj), space.w_str)):
        return orig_obj
    if space.config.objspace.std.withstrslice:
        from pypy.objspace.std.strsliceobject import W_StringSliceObject
        if ((stop - start) > ((len(s) * 0.2) + 40)):
            return W_StringSliceObject(s, start, stop)
    return wrapstr(space, s[start:stop])