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

Method __init__

Lib/argparse.py:1039–1068  ·  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

1037class _StoreAction(Action):
1038
1039 def __init__(self,
1040 option_strings,
1041 dest,
1042 nargs=None,
1043 const=None,
1044 default=None,
1045 type=None,
1046 choices=None,
1047 required=False,
1048 help=None,
1049 metavar=None,
1050 deprecated=False):
1051 if nargs == 0:
1052 raise ValueError('nargs for store actions must be != 0; if you '
1053 'have nothing to store, actions such as store '
1054 'true or store const may be more appropriate')
1055 if const is not None and nargs != OPTIONAL:
1056 raise ValueError('nargs must be %r to supply const' % OPTIONAL)
1057 super(_StoreAction, self).__init__(
1058 option_strings=option_strings,
1059 dest=dest,
1060 nargs=nargs,
1061 const=const,
1062 default=default,
1063 type=type,
1064 choices=choices,
1065 required=required,
1066 help=help,
1067 metavar=metavar,
1068 deprecated=deprecated)
1069
1070 def __call__(self, parser, namespace, values, option_string=None):
1071 setattr(namespace, self.dest, values)

Callers

nothing calls this directly

Calls 2

superClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected