proper name for python * operator?

后端 未结 8 2009
不知归路
不知归路 2020-11-22 07:20

What is the correct name for operator *, as in function(*args)? unpack, unzip, something else?

相关标签:
8条回答
  • 2020-11-22 07:46

    One can also call * a gather parameter (when used in function arguments definition) or a scatter operator (when used at function invocation).

    As seen here: Think Python/Tuples/Variable-length argument tuples.

    0 讨论(0)
  • 2020-11-22 07:54

    The Python Tutorial simply calls it 'the *-operator'. It performs unpacking of arbitrary argument lists.

    0 讨论(0)
提交回复
热议问题