An argument of - is equivalent to --.
Are you quoting this from some authoritative reference or is this your own interpretation? Because many programs treat a single - as a special file name for standard input / output. So, for example in
$ diff - somefile
the - means “read the first file from standard input” whereas
$ diff -- -o somefile
means “read the first file from the awkwardly named file -o”. If we wanted to compare a file read from standard input with -o, the command would be
$ diff - -- -o
which is equivalent to
$ diff -- - -o
but only if you are not applying the rule you are quoting.
But what will happen when an app required:
myapp cmd <arg> -f <args>...
I would consider that a questionable design in the first place because usually, options should go before positional arguments. Although they may be mixed if this is unambiguous, which here it doesn't seem to be.
The rest of your example is not entirely clear to me (Did you possibly forget to list cmd in your examples?) but it seems that the source of the problem is accepting more than one argument list of variable length. Here, it doesn't really matter whether they are arguments to an option or the main program directly. Programs that accept such options usually have to introduce their own syntax to disambiguate the command line. For example, the -exec option of the find program terminates its argument list with a ;. Another trick is to ask a user to pass the arguments as one token and separate them with a special character. For example, the -o option of the mount program accepts a comma-separated list of arguments passed to the program as one token.
I'm writing a command line parser for python so I need to know how it should behave.
Just to be sure: Did you discover the argparse module from the standard library yet?