SyntaxError:在参数function中的关键字arg之后的非关键字arg

Bla*_*Ram 1 python arguments function args

我有这个功能:

def crypting(self, client, access_token, client_id, client_secret, oauth_scope, redirect_uri):
Run Code Online (Sandbox Code Playgroud)

标题中的错误在此函数中:

FCU.crypting(client = None, access_token = None, client_id, client_secret, oauth_scope, redirect_uri)
Run Code Online (Sandbox Code Playgroud)

为什么?谢谢你的解决方案.

Bre*_*arn 7

这就是它所说的.您不能在关键字参数后传递非关键字参数.如果你有类似的东西client=None,这是一个关键字参数,所有这些都必须在参数列表的末尾.