CMS 3D CMS Logo

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__ (self, parser, namespace, values, option_string=None)
 
def __init__ (self, option_strings, dest, const, default=None, required=False, help=None, metavar=None)
 
- Public Member Functions inherited from argparse.Action
def __call__ (self, parser, namespace, values, option_string=None)
 
def __init__ (self, option_strings, dest, nargs=None, const =None, default=None, type=None, choices=None, required=False, help=None, metavar=None)
 
- Public Member Functions inherited from argparse._AttributeHolder
def __repr__ (self)
 

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.

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

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.

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