MCPcopy Index your code
hub / github.com/python/cpython / __init__

Method __init__

Lib/optparse.py:1168–1199  ·  view source on GitHub ↗
(self,
                 usage=None,
                 option_list=None,
                 option_class=Option,
                 version=None,
                 conflict_handler="error",
                 description=None,
                 formatter=None,
                 add_help_option=True,
                 prog=None,
                 epilog=None)

Source from the content-addressed store, hash-verified

1166 standard_option_list = []
1167
1168 def __init__(self,
1169 usage=None,
1170 option_list=None,
1171 option_class=Option,
1172 version=None,
1173 conflict_handler="error",
1174 description=None,
1175 formatter=None,
1176 add_help_option=True,
1177 prog=None,
1178 epilog=None):
1179 OptionContainer.__init__(
1180 self, option_class, conflict_handler, description)
1181 self.set_usage(usage)
1182 self.prog = prog
1183 self.version = version
1184 self.allow_interspersed_args = True
1185 self.process_default_values = True
1186 if formatter is None:
1187 formatter = IndentedHelpFormatter()
1188 self.formatter = formatter
1189 self.formatter.set_parser(self)
1190 self.epilog = epilog
1191
1192 # Populate the option list; initial sources are the
1193 # standard_option_list class attribute, the 'option_list'
1194 # argument, and (if applicable) the _add_version_option() and
1195 # _add_help_option() methods.
1196 self._populate_option_list(option_list,
1197 add_help=add_help_option)
1198
1199 self._init_parsing_state()
1200
1201
1202 def destroy(self):

Callers

nothing calls this directly

Calls 6

set_usageMethod · 0.95
_populate_option_listMethod · 0.95
_init_parsing_stateMethod · 0.95
set_parserMethod · 0.80
__init__Method · 0.45

Tested by

no test coverage detected