[Python] Typing unused arguments

Discussão em 'Python' iniciado por Stack, Fevereiro 5, 2025.

  1. Stack

    Stack Membro Participativo

    I have a function that has to take two arguments, like:

    def f(first_arg: int, unused_arg) -> int:
    first_arg += 1
    return first_arg


    I want to type my function, what should be the type of unused_arg ? From this question I guess None could be used.

    For context, I'm using lax.scan from jax which needs a function with two arguments even when the second one is unused.

    Continue reading...

Compartilhe esta Página