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._StoreAction Class Reference
Inheritance diagram for argparse._StoreAction:
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 803 of file argparse.py.

Constructor & Destructor Documentation

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

Definition at line 815 of file argparse.py.

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

816  metavar=None):
817  if nargs == 0:
818  raise ValueError('nargs for store actions must be > 0; if you '
819  'have nothing to store, actions such as store '
820  'true or store const may be more appropriate')
821  if const is not None and nargs != OPTIONAL:
822  raise ValueError('nargs must be %r to supply const' % OPTIONAL)
823  super(_StoreAction, self).__init__(
824  option_strings=option_strings,
825  dest=dest,
826  nargs=nargs,
827  const=const,
828  default=default,
829  type=type,
830  choices=choices,
831  required=required,
832  help=help,
833  metavar=metavar)
def argparse._StoreAction.__init__ (   self,
  option_strings,
  dest,
  nargs = None,
  const = None,
  default = None,
  type = None,
  choices = None,
  required = False,
  help = None,
  metavar = None 
)

Definition at line 826 of file argparse.py.

References argparse._StoreAction.__init__().

827  metavar=None):
828  if nargs == 0:
829  raise ValueError('nargs for store actions must be > 0; if you '
830  'have nothing to store, actions such as store '
831  'true or store const may be more appropriate')
832  if const is not None and nargs != OPTIONAL:
833  raise ValueError('nargs must be %r to supply const' % OPTIONAL)
834  super(_StoreAction, self).__init__(
835  option_strings=option_strings,
836  dest=dest,
837  nargs=nargs,
838  const=const,
839  default=default,
840  type=type,
841  choices=choices,
842  required=required,
843  help=help,
844  metavar=metavar)

Member Function Documentation

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

Definition at line 834 of file argparse.py.

References argparse.Action.dest.

Referenced by argparse._StoreAction.__call__().

835  def __call__(self, parser, namespace, values, option_string=None):
836  setattr(namespace, self.dest, values)
837 
def argparse._StoreAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Definition at line 845 of file argparse.py.

References argparse._StoreAction.__call__(), argparse._StoreAction.__init__(), and argparse.Action.dest.

846  def __call__(self, parser, namespace, values, option_string=None):
847  setattr(namespace, self.dest, values)
848