繁体   English   中英

我需要知道这条线在lambda function中的使用

[英]I need to know the use of this line in lambda function

这条线有什么用:

def process(config: dict, req_body: dict) -> Tuple[Union[List[Hourly_Data], Dict], int]:

def process(config: dict, req_body: dict) -> Tuple[Union[List[Hourly_Data], Dict], int]:
    response, status_code = {}, 200\
    #rest of the code
    return response, status_code

这与lambda function 无关

def process(config: dict, req_body: dict) -> Tuple[Union[List[Hourly_Data], Dict], int]:是使用类型提示process声明为 function 。

def process(config, req_body):
    """
    Parameters :
        config: dict, 
        req_body: dict
    Returns :
        tuple of :
            0: either a list of Hourly_Data object or a dict
            1: int
    """
    ...

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM