global 和nonlocal. 閉包. 閉包(closure) 是參照了外部環境的函式,什麼意思呢: def gen_power(base): def power(exp): return base ** exp return power power2 ...
確定! 回上一頁