CMS 3D CMS Logo

List of all members | Public Member Functions
argparse._AppendAction Class Reference
Inheritance diagram for argparse._AppendAction:
argparse.Action argparse._AttributeHolder

Public Member Functions

def __call__ (self, parser, namespace, values, option_string=None)
 
def __init__ (self, option_strings, dest, nargs=None, const =None, default=None, type=None, choices=None, required=False, help=None, metavar=None)
 
- Public Member Functions inherited from argparse.Action
def __call__ (self, parser, namespace, values, option_string=None)
 
def __init__ (self, option_strings, dest, nargs=None, const =None, default=None, type=None, choices=None, required=False, help=None, metavar=None)
 
- Public Member Functions inherited from argparse._AttributeHolder
def __repr__ (self)
 

Additional Inherited Members

- Public Attributes inherited from argparse.Action
 choices
 
 const
 
 default
 
 dest
 
 help
 
 metavar
 
 nargs
 
 option_strings
 
 required
 
 type
 

Detailed Description

Definition at line 906 of file argparse.py.

Constructor & Destructor Documentation

def argparse._AppendAction.__init__ (   self,
  option_strings,
  dest,
  nargs = None,
  const = None,
  default = None,
  type = None,
  choices = None,
  required = False,
  help = None,
  metavar = None 
)

Definition at line 918 of file argparse.py.

918  metavar=None):
919  if nargs == 0:
920  raise ValueError('nargs for append actions must be > 0; if arg '
921  'strings are not supplying the value to append, '
922  'the append const action may be more appropriate')
923  if const is not None and nargs != OPTIONAL:
924  raise ValueError('nargs must be %r to supply const' % OPTIONAL)
925  super(_AppendAction, self).__init__(
926  option_strings=option_strings,
927  dest=dest,
928  nargs=nargs,
929  const=const,
930  default=default,
931  type=type,
932  choices=choices,
933  required=required,
934  help=help,
935  metavar=metavar)
936 
def __init__(self, option_strings, dest, nargs=None, const =None, default=None, type=None, choices=None, required=False, help=None, metavar=None)
Definition: argparse.py:918

Member Function Documentation

def argparse._AppendAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Definition at line 937 of file argparse.py.

References argparse._ensure_value(), argparse.Action.dest, and python.rootplot.argparse.Action.dest.

937  def __call__(self, parser, namespace, values, option_string=None):
938  items = _copy.copy(_ensure_value(namespace, self.dest, []))
939  items.append(values)
940  setattr(namespace, self.dest, items)
941 
942 
def _ensure_value(namespace, name, value)
Definition: argparse.py:167
def __call__(self, parser, namespace, values, option_string=None)
Definition: argparse.py:937