def test_arg_index_attrs() -> None:
    """Accessing argument index and attributes."""
    assert "{0.real}, {0.imag}".format(3 - 5j) == "3.0, -5.0"

    class Point:
        """Point with x-y coordinates."""

        def __init__(self, x: int, y: int) -> None:
            self.x = x
            self.y = y

        def __str__(self) -> str:
            return "Point({self.x}, {self.y})".format(self=self)

    assert str(Point(3, 4)) == "Point(3, 4)"

    assert "x: {0[0]}, y: {0[1]}".format((3, 4)) == "x: 3, y: 4"