dimanche 17 décembre 2017

calling complex method in python

I have an error when running this section codes:

def foo(a=1, b=None, unit=1, *arg):
    # some process    
    print(a+min(arg))

foo(arg=3,4)

out[0]: SyntaxError: non-keyword arg after keyword arg

What is the best way for calling foo method?

Aucun commentaire:

Enregistrer un commentaire