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

Constructor & Destructor Documentation

def argparse._AppendConstAction.__init__ (   self,
  option_strings,
  dest,
  const,
  default = None,
  required = False,
  help = None,
  metavar = None 
)

Definition at line 952 of file argparse.py.

953  metavar=None):
954  super(_AppendConstAction, self).__init__(
955  option_strings=option_strings,
956  dest=dest,
957  nargs=0,
958  const=const,
959  default=default,
960  required=required,
961  help=help,
962  metavar=metavar)

Member Function Documentation

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

Definition at line 963 of file argparse.py.

References argparse._ensure_value(), argparse.Action.const, python.rootplot.argparse.Action.const, argparse.Action.dest, and python.rootplot.argparse.Action.dest.

964  def __call__(self, parser, namespace, values, option_string=None):
965  items = _copy.copy(_ensure_value(namespace, self.dest, []))
966  items.append(self.const)
967  setattr(namespace, self.dest, items)
968 
def _ensure_value
Definition: argparse.py:167