CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes
argparse._MutuallyExclusiveGroup Class Reference
Inheritance diagram for argparse._MutuallyExclusiveGroup:
argparse._ArgumentGroup argparse._ActionsContainer

Public Member Functions

def __init__
 
- Public Member Functions inherited from argparse._ArgumentGroup
def __init__
 
- Public Member Functions inherited from argparse._ActionsContainer
def __init__
 
def add_argument
 
def add_argument_group
 
def add_mutually_exclusive_group
 
def register
 
def set_defaults
 

Public Attributes

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

Private Member Functions

def _add_action
 
def _remove_action
 

Private Attributes

 _container
 

Detailed Description

Definition at line 1483 of file argparse.py.

Constructor & Destructor Documentation

def argparse._MutuallyExclusiveGroup.__init__ (   self,
  container,
  required = False 
)

Definition at line 1485 of file argparse.py.

1486  def __init__(self, container, required=False):
1487  super(_MutuallyExclusiveGroup, self).__init__(container)
1488  self.required = required
1489  self._container = container

Member Function Documentation

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

Definition at line 1490 of file argparse.py.

1491  def _add_action(self, action):
1492  if action.required:
1493  msg = _('mutually exclusive arguments must be optional')
1494  raise ValueError(msg)
1495  action = self._container._add_action(action)
1496  self._group_actions.append(action)
1497  return action
def argparse._MutuallyExclusiveGroup._remove_action (   self,
  action 
)
private

Definition at line 1498 of file argparse.py.

1499  def _remove_action(self, action):
1500  self._container._remove_action(action)
1501  self._group_actions.remove(action)
1502 

Member Data Documentation

argparse._MutuallyExclusiveGroup._container
private

Definition at line 1488 of file argparse.py.

argparse._MutuallyExclusiveGroup.required

Definition at line 1487 of file argparse.py.