CMS 3D CMS Logo

List of all members | Public Member Functions
argparse._CountAction Class Reference
Inheritance diagram for argparse._CountAction:
argparse.Action argparse._AttributeHolder

Public Member Functions

def __call__ (self, parser, namespace, values, option_string=None)
 
def __init__ (self, option_strings, dest, default=None, required=False, help=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 969 of file argparse.py.

Constructor & Destructor Documentation

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

Definition at line 976 of file argparse.py.

976  help=None):
977  super(_CountAction, self).__init__(
978  option_strings=option_strings,
979  dest=dest,
980  nargs=0,
981  default=default,
982  required=required,
983  help=help)
984 
def __init__(self, option_strings, dest, default=None, required=False, help=None)
Definition: argparse.py:976

Member Function Documentation

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

Definition at line 985 of file argparse.py.

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

985  def __call__(self, parser, namespace, values, option_string=None):
986  new_count = _ensure_value(namespace, self.dest, 0) + 1
987  setattr(namespace, self.dest, new_count)
988 
989 
def __call__(self, parser, namespace, values, option_string=None)
Definition: argparse.py:985
def _ensure_value(namespace, name, value)
Definition: argparse.py:167