Repository: ManimCommunity/manim
File: manim/mobject/three_dimensions.py (Python)

Code before:
        params="u_min,u_max,v_min,v_max",
        since="v0.8.0",
        until="v0.9.0",
        message="Use u_range and v_range instead.",
    )
    def __init__(
        self,
        func,
        u_range=[0, 1],
        v_range=[0, 1],
        resolution=32,
        surface_piece_config={},
        fill_color=BLUE_D,
        fill_opacity=1.0,
        checkerboard_colors=[BLUE_D, BLUE_E],
        stroke_color=LIGHT_GREY,
        stroke_width=0.5,
        should_make_jagged=False,
        pre_function_handle_to_anchor_scale_factor=0.00001,
        **kwargs
    ):
        VGroup.__init__(self, **kwargs)
        self.u_min = u_range[0] if "u_min" not in kwargs else kwargs.pop("u_min")
        self.u_max = u_range[1] if "u_max" not in kwargs else kwargs.pop("u_max")
        self.v_min = v_range[0] if "v_min" not in kwargs else kwargs.pop("v_min")
        self.v_max = v_range[1] if "v_max" not in kwargs else kwargs.pop("v_max")
        self.resolution = resolution
        self.surface_piece_config = surface_piece_config
        self.fill_color = fill_color
        self.fill_opacity = fill_opacity
        self.checkerboard_colors = checkerboard_colors
        self.stroke_color = stroke_color
        self.stroke_width = stroke_width
        self.should_make_jagged = should_make_jagged
        self.pre_function_handle_to_anchor_scale_factor = (
            pre_function_handle_to_anchor_scale_factor
        )
        self.func = func
        self.setup_in_uv_space()
        self.apply_function(lambda p: func(p[0], p[1]))
        if self.should_make_jagged:
            self.make_jagged()

    def get_u_values_and_v_values(self):
        res = tuplify(self.resolution)
        if len(res) == 1:
            u_res = v_res = res[0]
        else:
            u_res, v_res = res
        u_min = self.u_min
        u_max = self.u_max

Review comment (suggestion):
These should be placed before `VGroup.__init__` otherwise an error is produced that says an unexpected argument is received. Also, I feel like
 ```py
kwargs.pop("u_min", None) or u_range[0]
```
  would be a more concise/clearer way of handling this.

Code after:
                    lambda u, v: axes.c2p(*self.func(u, v)),
                    u_range=[-PI, PI],
                    v_range=[0, TAU]
                )
                self.set_camera_orientation(theta=70 * DEGREES, phi=75 * DEGREES)
                self.add(axes, surface)
    """

    @deprecated_params(
        params="u_min,u_max,v_min,v_max",
        since="v0.9.0",
        until="v0.10.0",
        message="Use u_range and v_range instead.",
    )
    def __init__(
        self,
        func: Callable[[float, float], np.ndarray],
        u_range: Sequence[float] = [0, 1],
        v_range: Sequence[float] = [0, 1],
        resolution: Sequence[int] = 32,
        surface_piece_config: dict = {},
        fill_color: "Color" = BLUE_D,
        fill_opacity: float = 1.0,
        checkerboard_colors: Sequence["Color"] = [BLUE_D, BLUE_E],
        stroke_color: "Color" = LIGHT_GREY,
        stroke_width: float = 0.5,
        should_make_jagged: bool = False,
        pre_function_handle_to_anchor_scale_factor: float = 0.00001,
        **kwargs
    ) -> None:
        self.u_min = kwargs.pop("u_min", None) or u_range[0]
        self.u_max = kwargs.pop("u_max", None) or u_range[1]
        self.v_min = kwargs.pop("v_min", None) or v_range[0]
        self.v_max = kwargs.pop("v_max", None) or v_range[1]
        super().__init__(**kwargs)
        self.resolution = resolution
        self.surface_piece_config = surface_piece_config
        self.fill_color = fill_color
        self.fill_opacity = fill_opacity
        self.checkerboard_colors = checkerboard_colors
        self.stroke_color = stroke_color
        self.stroke_width = stroke_width
        self.should_make_jagged = should_make_jagged
        self.pre_function_handle_to_anchor_scale_factor = (
            pre_function_handle_to_anchor_scale_factor
        )
        self.func = func
        self.setup_in_uv_space()
        self.apply_function(lambda p: func(p[0], p[1]))
        if self.should_make_jagged:
            self.make_jagged()