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

Method __init__

Lib/argparse.py:1139–1168  ·  view source on GitHub ↗
(self,
                 option_strings,
                 dest,
                 nargs=None,
                 const=None,
                 default=None,
                 type=None,
                 choices=None,
                 required=False,
                 help=None,
                 metavar=None,
                 deprecated=False)

Source from the content-addressed store, hash-verified

1137class _AppendAction(Action):
1138
1139 def __init__(self,
1140 option_strings,
1141 dest,
1142 nargs=None,
1143 const=None,
1144 default=None,
1145 type=None,
1146 choices=None,
1147 required=False,
1148 help=None,
1149 metavar=None,
1150 deprecated=False):
1151 if nargs == 0:
1152 raise ValueError('nargs for append actions must be != 0; if arg '
1153 'strings are not supplying the value to append, '
1154 'the append const action may be more appropriate')
1155 if const is not None and nargs != OPTIONAL:
1156 raise ValueError('nargs must be %r to supply const' % OPTIONAL)
1157 super(_AppendAction, self).__init__(
1158 option_strings=option_strings,
1159 dest=dest,
1160 nargs=nargs,
1161 const=const,
1162 default=default,
1163 type=type,
1164 choices=choices,
1165 required=required,
1166 help=help,
1167 metavar=metavar,
1168 deprecated=deprecated)
1169
1170 def __call__(self, parser, namespace, values, option_string=None):
1171 items = getattr(namespace, self.dest, None)

Callers

nothing calls this directly

Calls 2

superClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected