1、函数定义
- A positional argument is a name that is not followed by an equal assign(=) and default value.
positional argument: ..., abc, ...
.
- A keyword argument is followed by an equal sign(=) and an expression that gives its default value.
keyword argument : tag='abc'
https://docs.python.org/3/reference/compound_stmts.html#function
https://docs.python.org/3/glossary.html
2、函数调用(calls)
argument_list ::= positional_arguments ["," starred_and_keywords] ["," keywords_arguments]
| starred_and_keywords ["," keywords_arguments]
| keywords_arguments
https://docs.python.org/3/reference/expressions.html#grammar-token-positional-arguments
在函数调用时,位置参数(positional argument )在前,关键字参数(keyword argument)在后,因为python中函数在解析参数时, 是按照顺序来的, 位置参数是必须先满足, 才能考虑其他可变参数。