def __init__(self, argv=sys.argv[<NUM_LIT:1>:]):
<EOL>self.error = None<EOL>'''<STR_LIT>'''<EOL>self.flags = {}<EOL>'''<STR_LIT>'''<EOL>self.args = []<EOL>'''<STR_LIT>'''<EOL>self.parentFlags = {}<EOL>'''<STR_LIT>'''<EOL>self.usage = '<STR_LIT>'<EOL>'''<STR_LIT>'''<EOL>self.optionList = OrderedDict(self.optionList)<EOL>longopts = []<EOL>padding = <NUM_LIT:0><EOL>shortopts = '<STR_LIT>'<EOL>for flag, val in self.optionList.items():<EOL><INDENT>optlen = len(flag) + <NUM_LIT:2><EOL>optlen += <NUM_LIT:4> if val[<NUM_LIT:0>] else <NUM_LIT:0><EOL>optlen += len(val[<NUM_LIT:1>]) + <NUM_LIT:1> if val[<NUM_LIT:0>] and val[<NUM_LIT:1>] else <NUM_LIT:0><EOL>optlen += len(val[<NUM_LIT:1>]) + <NUM_LIT:1> if val[<NUM_LIT:1>] else <NUM_LIT:0><EOL>padding = optlen if optlen > padding else padding<EOL><DEDENT>opthelp = '<STR_LIT>'<EOL>for flag, val in self.optionList.items():<EOL><INDENT>spec = flag + '<STR_LIT:=>' if val[<NUM_LIT:1>] else flag<EOL>longopts.append(spec)<EOL>self.flags.update({flag: None})<EOL>if val[<NUM_LIT:1>]:<EOL><INDENT>flagstring_long = ('<STR_LIT>'<EOL>.format(flag=flag, argument=val[<NUM_LIT:1>]))<EOL>if val[<NUM_LIT:0>]:<EOL><INDENT>flagstring_short = ('<STR_LIT>'<EOL>.format(flag=val[<NUM_LIT:0>], argument=val[<NUM_LIT:1>]))<EOL><DEDENT><DEDENT>else:<EOL><INDENT>flagstring_long = flag<EOL>flagstring_short = val[<NUM_LIT:0>]<EOL><DEDENT>if val[<NUM_LIT:0>]:<EOL><INDENT>shortopts += val[<NUM_LIT:0>] + '<STR_LIT::>' if val[<NUM_LIT:1>] else val[<NUM_LIT:0>]<EOL>optline = ('<STR_LIT>'<EOL>.format(short=flagstring_short,<EOL>flag=flagstring_long))<EOL><DEDENT>else:<EOL><INDENT>optline = '<STR_LIT>'.format(flag=flagstring_long)<EOL><DEDENT>opthelp += ('<STR_LIT>'<EOL>.format(options=optline, padding=padding, desc=val[<NUM_LIT:2>]))<EOL><DEDENT>self.usage = self.usagestr<EOL>if self.description:<EOL><INDENT>self.usage += '<STR_LIT>'.format(desc=self.description)<EOL><DEDENT>if self.optionList:<EOL><INDENT>self.usage += '<STR_LIT>'.format(opts=opthelp)<EOL><DEDENT>if self.usageTextExtra:<EOL><INDENT>self.usage += '<STR_LIT>'.format(help=self.usageTextExtra)<EOL><DEDENT>try:<EOL><INDENT>opts, self.args = getopt.getopt(argv, shortopts, longopts)<EOL><DEDENT>except getopt.GetoptError as err:<EOL><INDENT>self.error = err<EOL>return  <EOL><DEDENT>for opt in opts:<EOL><INDENT>for flag, val in self.optionList.items():<EOL><INDENT>if opt[<NUM_LIT:0>][<NUM_LIT:1>] != '<STR_LIT:->':<EOL><INDENT>if opt[<NUM_LIT:0>][<NUM_LIT:1>] == val[<NUM_LIT:0>]:<EOL><INDENT>if val[<NUM_LIT:1>]:<EOL><INDENT>self.flags[flag] = opt[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>self.flags[flag] = True<EOL><DEDENT><DEDENT><DEDENT>else:<EOL><INDENT>if opt[<NUM_LIT:0>][<NUM_LIT:2>:] == flag:<EOL><INDENT>if val[<NUM_LIT:1>]:<EOL><INDENT>self.flags[flag] = opt[<NUM_LIT:1>]<EOL><DEDENT>else:<EOL><INDENT>self.flags[flag] = True<EOL><DEDENT><DEDENT><DEDENT><DEDENT><DEDENT>self.flags = dictobject(self.flags)<EOL>
Initialize (sub)command object

        :Parameters:
            - `argv`: List of arguments. E.g. `sys.argv[1:]`