Lines Matching refs:long
145 long, short, help = option
148 long, short, help, repeat = option
155 if not isinstance(long, str) or len(long) < 2:
157 "must be a string of length >= 2") % long)
164 self.repeat[long] = repeat
165 self.long_opts.append(long)
167 if long[-1] == '=': # option takes an argument?
169 long = long[0:-1]
170 self.takes_arg[long] = 1
174 alias_to = self.negative_alias.get(long)
180 % (long, alias_to))
182 self.long_opts[-1] = long # XXX redundant?!
183 self.takes_arg[long] = 0
187 alias_to = self.alias.get(long)
189 if self.takes_arg[long] != self.takes_arg[alias_to]:
194 % (long, alias_to))
200 if not longopt_re.match(long):
203 "(must be letters, numbers, hyphens only" % long)
205 self.attr_name[long] = self.get_attr_name(long)
208 self.short2long[short[0]] = long
291 long = option[0]
293 l = len(long)
294 if long[-1] == '=':
334 long, short, help = option[:3]
336 if long[-1] == '=':
337 long = long[0:-1]
342 lines.append(" --%-*s %s" % (max_opt, long, text[0]))
344 lines.append(" --%-*s " % (max_opt, long))
349 opt_names = "%s (-%s)" % (long, short)