[Python] Add comments for conditional argument in python function, which llm will understand...

Discussão em 'Python' iniciado por Stack, Dezembro 20, 2024.

  1. Stack

    Stack Membro Participativo

    I have one python function with parameters named - category, param_1 and param_2. The parameters have some dependencies listed below. I want to write proper explanation for these arguments in the function comment. Could someone help me with this ? Thanks in advance!

    category | param_1 | param_2
    ---------------------------------------------
    p_sub_type | Com or Non Com | Comp
    | Com | Sl
    | Non Com | Sl
    ---------------------------------------------
    s_type_category | Com | Comp
    | Non Com | Comp
    | Md | Desg
    ---------------------------------------------
    Desg | Ad |
    | Sb |


    Reference function

    def func(category,param_1,param_2):
    '''
    Args:
    category (str): ????
    param_1 (str): ????
    param_2 (str): ????
    '''

    # Logic goes here

    Continue reading...

Compartilhe esta Página