def __init__(self, x_list=None, y_list=None, y_inter=None):
if not y_inter:<EOL><INDENT>y_inter = interpolation.linear()<EOL><DEDENT>y_left, y_mid, y_right = interpolation.constant(), interpolation.linear(), interpolation.constant()<EOL>if isinstance(y_inter, (tuple, list)):<EOL><INDENT>if len(y_inter) == <NUM_LIT:3>:<EOL><INDENT>y_left, y_mid, y_right = y_inter<EOL><DEDENT>elif len(y_inter) == <NUM_LIT:2>:<EOL><INDENT>y_mid, y_right = y_inter<EOL>y_left = y_right<EOL><DEDENT>elif len(y_inter) == <NUM_LIT:1>:<EOL><INDENT>y_mid = y_inter[<NUM_LIT:0>]<EOL><DEDENT>else:<EOL><INDENT>raise ValueError<EOL><DEDENT><DEDENT>elif isinstance(y_inter, interpolation.base_interpolation):<EOL><INDENT>y_mid = y_inter<EOL><DEDENT>else:<EOL><INDENT>raise AttributeError<EOL><DEDENT>assert len(x_list) == len(y_list)<EOL>assert len(x_list) == len(set(x_list))<EOL>self._y_mid = type(y_mid)(x_list, y_list)<EOL>self._y_right = type(y_right)(x_list, y_list)<EOL>self._y_left = type(y_left)(x_list, y_list)<EOL>
r"""
        Curve object to build function

        :param list(float) x_list: source values
        :param list(float) y_list: target values
        :param list(interpolation.interpolation) y_inter: interpolation function on x_list (optional)
            or triple of (left, mid, right) interpolation functions with
            left for x < x_list[0] (as default triple.right is used)
            right for x > x_list][-1] (as default interpolation.constant is used)
            mid else (as default interpolation.linear is used)

        Curve object to build function :math:`f:R \rightarrow R, x \mapsto y`
        from finite point vectors :math:`x` and :math:`y`
        using piecewise various interpolation functions.