[Python] argparse - disable same argument occurrences

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

  1. Stack

    Stack Membro Participativo

    I'm trying to disable same argument occurences within one command line, using argparse

    ./python3 --argument1=something --argument2 --argument1=something_else


    which means this should raise an error, because value of argument1 is overriden, by default, argparse just overrides the value and continues like nothing happened... Is there any smart way how to disable this behaviour?

    Continue reading...

Compartilhe esta Página