Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有这个功能:
def crypting(self, client, access_token, client_id, client_secret, oauth_scope, redirect_uri):
标题中的错误在此函数中:
FCU.crypting(client = None, access_token = None, client_id, client_secret, oauth_scope, redirect_uri)
为什么?感谢您的解决方案。
这就是它所说的。您不能在关键字参数之后传递非关键字参数。如果你有类似的东西client=None,那是一个关键字参数,所有这些都必须放在参数列表的末尾。
client=None
用其他方法解决的问题:
variable1 = None variable2 = None class.function(variable1, variable2, client_id, client_secret)
在此处查看第 4.7.2 节:
http://docs.python.org/2/tutorial/controlflow.html