CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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__
 
def __init__
 
- Public Member Functions inherited from argparse.Action
def __call__
 
def __init__
 
- Public Member Functions inherited from argparse._AttributeHolder
def __repr__
 

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.

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

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.

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