Hello – I not a python expert but looking at the various
implementations of getopt from C code to how the BASH shell does it —
one item that I am not clear about is when a short option is an
alternative to a long option, ie -o and –output for an output file. So
my question is if I wanted to test to see if “output” was specified,
does the code require to test for both the long and short option just
the long or short option – if both are set, which one wins?
Typically the long and short options are associated and so the option
parser treats them as if they were the same option. The program should
not care which form, short or long, was actually used, and typically
there's no way to tell.