python argument types: a position parameter, default parameters, the dynamic parameters

1, positional parameters: call functions pass parameters, parameter default order assignment, if the specified parameter assignment, does not care about the order. Specify the parameter a = 1, b = 2 in the body of the function a = 1, b = 2

2, default parameters: when the function definition, a parameter set to the default value  

3, dynamic parameters: * args calling function is passed or not pass any parameters passed to the function into the interior of these functions will to a tuple

4, a function of the position parameter, default parameter in the default parameter must front position parameters

Guess you like

Origin www.cnblogs.com/mo-nian/p/11841066.html