python - python * 运算符的正确名称?

标签 python operators splat

运算符 * 的正确名称是什么,例如 function(*args)?解压、解压,还是别的什么?

最佳答案

在 Ruby 和 Perl 6 中,这被称为“splat”,我认为大多数人来自 如果你这么称呼,那些社区会明白你的意思。

Python tutorial使用短语“解包参数列表”,即 冗长且具有描述性。

也称为 iterable unpacking ,或者在 ** 的情况下, dictionary unpacking .

关于python - python * 运算符的正确名称?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/2322355/

相关文章:

c - C 中的运算符 &= 和 ~1U

ruby - 为什么带有 splat 参数的 Ruby 过程/ block 的行为与方法和 lambda 不同?

python - 将文件下载到特定文件夹 python

Python 和 ShutdownBlockReasonCreate、ShutdownBlockReasonDestroy 和 ShutdownBlockReasonQuery

python - |= 在 python 中的用例

PHP,速记,If..Else 使用三元运算符

python - python * 运算符的专有名称?

python - 使用 Python 计算 NDVI

python - Python 中的 MD5 哈希函数更改数据