Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
argparse._AppendAction Class Reference
Inheritance diagram for argparse._AppendAction:
Inheritance graph
[legend]
Collaboration diagram for argparse._AppendAction:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __call__
def __repr__

Public Attributes

 option_strings
 dest
 nargs
 const
 default
 type
 choices
 required
 help
 metavar
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_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 
)

Reimplemented from argparse.Action.

Definition at line 907 of file argparse.py.

00907 
00908                  metavar=None):
00909         if nargs == 0:
00910             raise ValueError('nargs for append actions must be > 0; if arg '
00911                              'strings are not supplying the value to append, '
00912                              'the append const action may be more appropriate')
00913         if const is not None and nargs != OPTIONAL:
00914             raise ValueError('nargs must be %r to supply const' % OPTIONAL)
00915         super(_AppendAction, self).__init__(
00916             option_strings=option_strings,
00917             dest=dest,
00918             nargs=nargs,
00919             const=const,
00920             default=default,
00921             type=type,
00922             choices=choices,
00923             required=required,
00924             help=help,
00925             metavar=metavar)

Here is the caller graph for this function:


Member Function Documentation

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

Reimplemented from argparse.Action.

Definition at line 926 of file argparse.py.

00926 
00927     def __call__(self, parser, namespace, values, option_string=None):
00928         items = _copy.copy(_ensure_value(namespace, self.dest, []))
00929         items.append(values)
00930         setattr(namespace, self.dest, items)
00931 

Here is the call graph for this function:

def argparse._AttributeHolder.__repr__ (   self) [inherited]

Definition at line 121 of file argparse.py.

00121 
00122     def __repr__(self):
00123         type_name = type(self).__name__
00124         arg_strings = []
00125         for arg in self._get_args():
00126             arg_strings.append(repr(arg))
00127         for name, value in self._get_kwargs():
00128             arg_strings.append('%s=%r' % (name, value))
00129         return '%s(%s)' % (type_name, ', '.join(arg_strings))

Here is the call graph for this function:


Member Data Documentation

Definition at line 780 of file argparse.py.

argparse.Action.const [inherited]

Definition at line 777 of file argparse.py.

Definition at line 778 of file argparse.py.

argparse.Action.dest [inherited]
argparse.Action.help [inherited]

Definition at line 782 of file argparse.py.

Definition at line 783 of file argparse.py.

argparse.Action.nargs [inherited]

Definition at line 776 of file argparse.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 774 of file argparse.py.

Definition at line 781 of file argparse.py.

argparse.Action.type [inherited]

Definition at line 779 of file argparse.py.


The documentation for this class was generated from the following file: