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.Action argparse._AttributeHolder argparse._AttributeHolder argparse._AttributeHolder argparse._AttributeHolder

Public Member Functions

def __call__
 
def __call__
 
def __init__
 
def __init__
 
- Public Member Functions inherited from argparse.Action
def __call__
 
def __call__
 
def __init__
 
def __init__
 
- Public Member Functions inherited from argparse._AttributeHolder
def __repr__
 
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 895 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 907 of file argparse.py.

Referenced by argparse._AppendAction.__call__(), and argparse._AppendAction.__init__().

908  metavar=None):
909  if nargs == 0:
910  raise ValueError('nargs for append actions must be > 0; if arg '
911  'strings are not supplying the value to append, '
912  'the append const action may be more appropriate')
913  if const is not None and nargs != OPTIONAL:
914  raise ValueError('nargs must be %r to supply const' % OPTIONAL)
915  super(_AppendAction, self).__init__(
916  option_strings=option_strings,
917  dest=dest,
918  nargs=nargs,
919  const=const,
920  default=default,
921  type=type,
922  choices=choices,
923  required=required,
924  help=help,
925  metavar=metavar)
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.

References argparse._AppendAction.__init__().

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 926 of file argparse.py.

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

Referenced by argparse._AppendAction.__call__().

927  def __call__(self, parser, namespace, values, option_string=None):
928  items = _copy.copy(_ensure_value(namespace, self.dest, []))
929  items.append(values)
930  setattr(namespace, self.dest, items)
931 
def _ensure_value
Definition: argparse.py:137
def argparse._AppendAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Definition at line 937 of file argparse.py.

References argparse._AppendAction.__call__(), argparse._AppendAction.__init__(), argparse._ensure_value(), and 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:137