Python 循环中的星号

Python star symbol in a loop

我正在使用 CPython,我在一个示例文件中看到了一个星号。 您能否解释一下 * 符号在这种情况下的含义? 这里的 pointsets 是来自 pybind11numpy array,因为它是 C++ 代码的输出。

Point(*point)和C++中的指针有关系吗?

polylines = []
for points in pointsets:
    points = [Point(*point) for point in points]
    polyline = Polyline(points)
    polylines.append(polyline)

它被称为解包操作符。 以下是文档中的内容:

An asterisk * denotes iterable unpacking. Its operand must be an iterable. The iterable is expanded into a sequence of items, which are included in the new tuple, list, or set, at the site of the unpacking.

它很像 Javascript ES6 中的“...”运算符。 (the spread operator)

https://docs.python.org/3/reference/expressions.html#expression-lists