问题:
In the following method definitions, what does the *
and **
do for param2
? 在以下方法定义中, *
和**
对param2
有何作用?
def foo(param1, *param2):
def bar(param1, **param2):
解决方案:
参考一: https://stackoom.com/question/9bB/双星号-星号-和-星号-星号-对参数有什么作用参考二: https://oldbug.net/q/9bB/What-does-double-star-asterisk-and-star-asterisk-do-for-parameters
来源:oschina
链接:https://my.oschina.net/u/4437974/blog/4298290