简体   繁体   中英

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

What is the use of this line:

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

in

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

This is not related to lambda function .

def process(config: dict, req_body: dict) -> Tuple[Union[List[Hourly_Data], Dict], int]: is the declaration of process as a function using type hints .

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
    """
    ...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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