bbcf/bbcfutils — comment on commit b355db98c4e3e30e0662a3e5bac49d8880897114
File:  line 0
By delafont:

Since this script is supposed to serve as a reference for defining options in the future, I want to point out a problem that appears with this way of defining options if one tries to define a lot of options and thus runs out of unique characters to define them.
If you don't define a single-letter '-x' shortcut for of calling the option, but only a '--xxxx', line
parser.add_option(opt[0],opt[1],help=opt[2],**opt[3])
will produce an error.
For example bowtie uses '-s' option for '--skip', so it cannot provide any nice shortcut for '--strata'. One should be able to define only long options.

For our next scripts I would suggest either add 'if' statements for any other unusual case that may arise, or use parser.add_option() directly.

In the latter case, I speak in favor of putting all help strings in a list and call them as follows:
help = iter(["help1","help2","help3"])
parser.add_option("-x","--xxxx", help=help.next())
parser.add_option("-y","--yyyy", help=help.next())
This make the call rather flexible - no indices subject to changes. It has been used for bbcfutils' maplot.py script.