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.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 932 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 941 of file argparse.py.

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

942  metavar=None):
943  super(_AppendConstAction, self).__init__(
944  option_strings=option_strings,
945  dest=dest,
946  nargs=0,
947  const=const,
948  default=default,
949  required=required,
950  help=help,
951  metavar=metavar)
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.

References argparse._AppendConstAction.__init__().

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 952 of file argparse.py.

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

Referenced by argparse._AppendConstAction.__call__().

953  def __call__(self, parser, namespace, values, option_string=None):
954  items = _copy.copy(_ensure_value(namespace, self.dest, []))
955  items.append(self.const)
956  setattr(namespace, self.dest, items)
957 
def _ensure_value
Definition: argparse.py:137
def argparse._AppendConstAction.__call__ (   self,
  parser,
  namespace,
  values,
  option_string = None 
)

Definition at line 963 of file argparse.py.

References argparse._AppendConstAction.__call__(), argparse._AppendConstAction.__init__(), argparse._ensure_value(), argparse.Action.const, and 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:137