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

Constructor & Destructor Documentation

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

Definition at line 965 of file argparse.py.

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

966  help=None):
967  super(_CountAction, self).__init__(
968  option_strings=option_strings,
969  dest=dest,
970  nargs=0,
971  default=default,
972  required=required,
973  help=help)
def argparse._CountAction.__init__ (   self,
  option_strings,
  dest,
  default = None,
  required = False,
  help = None 
)

Definition at line 976 of file argparse.py.

References argparse._CountAction.__init__().

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

Member Function Documentation

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

Definition at line 974 of file argparse.py.

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

Referenced by argparse._CountAction.__call__().

975  def __call__(self, parser, namespace, values, option_string=None):
976  new_count = _ensure_value(namespace, self.dest, 0) + 1
977  setattr(namespace, self.dest, new_count)
978 
def _ensure_value
Definition: argparse.py:137
def argparse._CountAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Definition at line 985 of file argparse.py.

References argparse._CountAction.__call__(), argparse._CountAction.__init__(), argparse._ensure_value(), and argparse.Action.dest.

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