https://docs.python.org/3/faq/programming.html#what-is-the-difference-between-arguments-and-parameters
Parameters are defined by the names that appear in a function definition, whereas arguments are the values actually passed to a function when calling it. Parameters define what types of arguments a function can accept. For example, given the function definition:
foo, bar and kwargs are parameters of func. However, when calling func, for example:
the values 42, 314, and somevar are arguments.
简而言之:arguments是实参,parameters是形参。阅读英文文档有点帮助。
本文详细解释了在Python中函数定义中的参数(parameters)与调用函数时传递的实参(arguments)之间的区别。通过一个具体的例子展示了如何定义带有默认值参数及关键字参数的函数,并说明了这些参数在实际调用时是如何被具体值所替代的。
2189

被折叠的 条评论
为什么被折叠?



