CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
argparse._ArgumentGroup Class Reference
Inheritance diagram for argparse._ArgumentGroup:
argparse._ActionsContainer argparse._MutuallyExclusiveGroup

Public Member Functions

def __init__ (self, container, title=None, description=None, kwargs)
 
- Public Member Functions inherited from argparse._ActionsContainer
def __init__ (self, description, prefix_chars, argument_default, conflict_handler)
 
def add_argument (self, args, kwargs)
 
def add_argument_group (self, args, kwargs)
 
def add_mutually_exclusive_group (self, kwargs)
 
def register (self, registry_name, value, object)
 
def set_defaults (self, kwargs)
 

Public Attributes

 title
 
- Public Attributes inherited from argparse._ActionsContainer
 argument_default
 
 conflict_handler
 
 description
 
 prefix_chars
 

Private Member Functions

def _add_action (self, action)
 
def _remove_action (self, action)
 

Private Attributes

 _actions
 
 _defaults
 
 _group_actions
 
 _has_negative_number_optionals
 
 _option_string_actions
 
 _registries
 

Detailed Description

Definition at line 1450 of file argparse.py.

Constructor & Destructor Documentation

def argparse._ArgumentGroup.__init__ (   self,
  container,
  title = None,
  description = None,
  kwargs 
)

Definition at line 1452 of file argparse.py.

References update.

1452  def __init__(self, container, title=None, description=None, **kwargs):
1453  # add any missing keyword arguments by checking the container
1454  update = kwargs.setdefault
1455  update('conflict_handler', container.conflict_handler)
1456  update('prefix_chars', container.prefix_chars)
1457  update('argument_default', container.argument_default)
1458  super_init = super(_ArgumentGroup, self).__init__
1459  super_init(description=description, **kwargs)
1460 
1461  # group attributes
1462  self.title = title
1463  self._group_actions = []
1464 
1465  # share most attributes with the container
1466  self._registries = container._registries
1467  self._actions = container._actions
1468  self._option_string_actions = container._option_string_actions
1469  self._defaults = container._defaults
1471  container._has_negative_number_optionals
1472 
def __init__(self, container, title=None, description=None, kwargs)
Definition: argparse.py:1452
#define update(a, b)

Member Function Documentation

def argparse._ArgumentGroup._add_action (   self,
  action 
)
private

Definition at line 1473 of file argparse.py.

1473  def _add_action(self, action):
1474  action = super(_ArgumentGroup, self)._add_action(action)
1475  self._group_actions.append(action)
1476  return action
1477 
def _add_action(self, action)
Definition: argparse.py:1473
def argparse._ArgumentGroup._remove_action (   self,
  action 
)
private

Definition at line 1478 of file argparse.py.

1478  def _remove_action(self, action):
1479  super(_ArgumentGroup, self)._remove_action(action)
1480  self._group_actions.remove(action)
1481 
1482 
def _remove_action(self, action)
Definition: argparse.py:1478

Member Data Documentation

argparse._ArgumentGroup._actions
private

Definition at line 1467 of file argparse.py.

argparse._ArgumentGroup._defaults
private

Definition at line 1469 of file argparse.py.

argparse._ArgumentGroup._group_actions
private

Definition at line 1463 of file argparse.py.

argparse._ArgumentGroup._has_negative_number_optionals
private

Definition at line 1470 of file argparse.py.

argparse._ArgumentGroup._option_string_actions
private

Definition at line 1468 of file argparse.py.

argparse._ArgumentGroup._registries
private

Definition at line 1466 of file argparse.py.

argparse._ArgumentGroup.title