def addAdditionalOptions(self):
        methodsDict = {}
        reflect.accumulateMethods(self.options, methodsDict, 'opt_')
        methodToShort = {}
        for name in methodsDict.copy():
            if len(name) == 1:
                methodToShort[methodsDict[name]] = name
                del methodsDict[name]

        for methodName, methodObj in methodsDict.items():
            longname = methodName.replace('_', '-') # t.p.usage does this
            # if this option is already defined by the optFlags or
            # optParameters then we don't want to override that data
            if longname in self.optAll_d:
                continue

            descr = self.getDescription(longname)

            short = None
            if methodObj in methodToShort:
                short = methodToShort[methodObj]

            reqArgs = methodObj.im_func.func_code.co_argcount
            if reqArgs == 2:
                self.optParams.append([longname, short, None, descr])
                self.optParams_d[longname] = [short, None, descr]
                self.optAll_d[longname] = [short, None, descr]
            elif reqArgs == 1:
                self.optFlags.append([longname, short, descr])
                self.optFlags_d[longname] = [short, descr]
                self.optAll_d[longname] = [short, None, descr]
            else:
                raise TypeError, '%r has wrong number ' \
                                 'of arguments' % (methodObj,)
Add additional options to the optFlags and optParams lists.
dataset/ETHPy150Open nlloyd/SubliminalCollaborator/libs/twisted/python/zshcomp.py/ArgumentsGenerator.addAdditionalOptions