简体   繁体   English

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

[英]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 .这与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: 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.

相关问题 我不知道为什么我使用GUI Button命令只能运行lambda function - I don't know why only lambda function can run when I use GUI Button command 我如何知道在 numpy 中实现 function 时是否需要使用 np.dot() 或 * 运算符? - How do I know if I need to use np.dot() or * operator when implementing a function in numpy? 我不知道这个 lambda function 是如何工作的 - I don't know how this lambda function works 需要转换为lambda函数 - Need to convert to lambda function 如何使用 lambda 作为 function 参数? - How can I use lambda as function parameter? 有没有办法使用地图功能或for循环进行融化? 我需要用同一行代码融化5个数据框 - Is there a way to use map function or for loop for melting? I need to melt 5 dataframes with same line of code 在创建 UDF Pyspark 时,何时需要使用 lambda(何时不需要)? - When I need to use lambda (and when not) while creating a UDF Pyspark? 每次我需要在 Lambda 中使用它时如何避免打包请求? - How to avoid packaging requests every time I need to use it in a Lambda? 如何在一行代码中解释filter和lambda的功能? - How can I explain the function of filter and lambda in a line of code? 在数据框中使用的Lambda函数 - Lambda function to use in dataframe
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM