簡體   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