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

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

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

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

Referenced by argparse._AppendConstAction.__call__().

952  def __call__(self, parser, namespace, values, option_string=None):
953  items = _copy.copy(_ensure_value(namespace, self.dest, []))
954  items.append(self.const)
955  setattr(namespace, self.dest, items)
956 
def _ensure_value
Definition: argparse.py:136
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:136