[Python] enforce arguments to a specific list of values

Discussão em 'Python' iniciado por Stack, Julho 10, 2025.

  1. Stack

    Stack Membro Participativo

    What is the pythonic way to enforce a function to take a specific set of values for a given parameter? For instance there is a function like:

    def results(status, data):



    I want to restrict the parameter status to a set of values like 0, 1 or 99.

    Continue reading...

Compartilhe esta Página