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

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

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

References argparse.Action.dest.

Referenced by argparse._StoreAction.__call__().

834  def __call__(self, parser, namespace, values, option_string=None):
835  setattr(namespace, self.dest, values)
836 
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