摘要: python 为何要设计这种?正确:def f(a=2,b=2,c=3): return a+b+cprint(f(*(1,1),c=1))错误:def f(a=2,b=2,c=3): return a+b+cprint(f(*(1,1),1))会被提示:而这个会被提示:def f(a=2,b=2,c=3): return a+b+cprint(f(a=1,*(1,1)))>>> Traceback (most recent call last): File "C:\Users\un_ieval.py", line 91, in print(f(a=1,* 阅读全文
posted @ 2013-11-10 20:34 LisPythoniC 阅读(237) 评论(0) 推荐(0) 编辑