CMS 3D CMS Logo

Public Member Functions

argparse::_AppendConstAction Class Reference

Inheritance diagram for argparse::_AppendConstAction:
argparse::Action argparse::Action argparse::_AttributeHolder argparse::_AttributeHolder argparse::_AttributeHolder argparse::_AttributeHolder

List of all members.

Public Member Functions

def __call__
def __call__
def __init__
def __init__

Detailed Description

Definition at line 931 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 933 of file argparse.py.

00941                               :
00942         super(_AppendConstAction, self).__init__(
00943             option_strings=option_strings,
00944             dest=dest,
00945             nargs=0,
00946             const=const,
00947             default=default,
00948             required=required,
00949             help=help,
00950             metavar=metavar)

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

Definition at line 945 of file argparse.py.

00952                               :
00953         super(_AppendConstAction, self).__init__(
00954             option_strings=option_strings,
00955             dest=dest,
00956             nargs=0,
00957             const=const,
00958             default=default,
00959             required=required,
00960             help=help,
00961             metavar=metavar)
00962 

Member Function Documentation

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

Reimplemented from argparse::Action.

Definition at line 951 of file argparse.py.

00952                                                                      :
00953         items = _copy.copy(_ensure_value(namespace, self.dest, []))
00954         items.append(self.const)
00955         setattr(namespace, self.dest, items)
00956 

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

Reimplemented from argparse::Action.

Definition at line 963 of file argparse.py.

00963                                                                      :
00964         items = _copy.copy(_ensure_value(namespace, self.dest, []))
00965         items.append(self.const)
00966         setattr(namespace, self.dest, items)
00967 
00968