我在使用python定义变量时遇到了一个很离谱的语法错误,我曾经当面问过高手但是他说没见过

Jason990420
最佳答案

AMEN-GoEdge-User_backEnd/Controller/UserService.py

async def registerUser(
        ...
        commons: dict = Depends(Utils.init),
    ):
    #  初始化
    email = None
    mobile = None
    ...
    return res

你的代码不同, 少了一个函数参数定义结束的右括号.

async def registerUser(
        ...
        commons: dict = Utils.init:
        # 这里少了参数定义结束的右括号
    #  初始化
    email = None
    mobile = None
    ...
    return res
2个月前 评论
Lemon0818 (楼主) 2个月前
讨论数量: 2
Jason990420

AMEN-GoEdge-User_backEnd/Controller/UserService.py

async def registerUser(
        ...
        commons: dict = Depends(Utils.init),
    ):
    #  初始化
    email = None
    mobile = None
    ...
    return res

你的代码不同, 少了一个函数参数定义结束的右括号.

async def registerUser(
        ...
        commons: dict = Utils.init:
        # 这里少了参数定义结束的右括号
    #  初始化
    email = None
    mobile = None
    ...
    return res
2个月前 评论
Lemon0818 (楼主) 2个月前

讨论应以学习和精进为目的。请勿发布不友善或者负能量的内容,与人为善,比聪明更重要!