混用参数命名方式,确保顺序在命名之前

def test(a, b, c=3):
    print(locals())

# 混用两种,确保顺序命名在前
test(c = 30, 1, 2)

SyntaxError: positional argument follows keyword argument

作者:everfight
出处:http://www.cnblogs.com/everfight/
本博客的文章如无特殊说明,均为原创,转载请注明出处。如未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利。

原文地址:https://www.cnblogs.com/everfight/p/args.html