命名參數
當一個關鍵字接受多于一個有默認值的參數時,只對最后一個參數進行重新賦值是不可能的。例如,一個關鍵字有三個參數:arg1=a, arg2=b, arg3=c,其中arg1和arg2最終會變成空字符串,而不是它們的默認值。
用位置參數覆蓋默認值
Test Case |
Action |
Argument |
Argument |
Argument |
Positional Arguments |
[Documentation] |
1st and 2nd |
argument get |
empty strings |
Example Keyword |
|
|
value |
原文轉自:http://www.anti-gravitydesign.com