CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Member Functions
argparse._AttributeHolder Class Reference
Inheritance diagram for argparse._AttributeHolder:
argparse.Action argparse.Action argparse.ArgumentParser argparse.ArgumentParser argparse.Namespace argparse.Namespace argparse._AppendAction argparse._AppendAction argparse._AppendConstAction argparse._AppendConstAction argparse._CountAction argparse._CountAction argparse._HelpAction argparse._HelpAction argparse._StoreAction argparse._StoreAction argparse._StoreConstAction argparse._StoreConstAction argparse._SubParsersAction argparse._SubParsersAction argparse._SubParsersAction._ChoicesPseudoAction argparse._SubParsersAction._ChoicesPseudoAction argparse._VersionAction argparse._VersionAction argparse._AppendAction argparse._AppendAction argparse._AppendConstAction argparse._AppendConstAction argparse._CountAction argparse._CountAction argparse._HelpAction argparse._HelpAction argparse._StoreAction argparse._StoreAction argparse._StoreConstAction argparse._StoreConstAction argparse._SubParsersAction argparse._SubParsersAction argparse._SubParsersAction._ChoicesPseudoAction argparse._SubParsersAction._ChoicesPseudoAction argparse._VersionAction argparse._VersionAction

Public Member Functions

def __repr__
 
def __repr__
 

Private Member Functions

def _get_args
 
def _get_args
 
def _get_kwargs
 
def _get_kwargs
 

Detailed Description

Abstract base class that provides __repr__.

The __repr__ method returns a string in the format::
    ClassName(attr=name, attr=name, ...)
The attributes are determined either by a class-level attribute,
'_kwarg_names', or by inspecting the instance __dict__.

Definition at line 112 of file argparse.py.

Member Function Documentation

def argparse._AttributeHolder.__repr__ (   self)

Definition at line 121 of file argparse.py.

References argparse._AttributeHolder._get_args(), argparse._AttributeHolder._get_kwargs(), and join().

Referenced by argparse._AttributeHolder.__repr__().

122  def __repr__(self):
123  type_name = type(self).__name__
124  arg_strings = []
125  for arg in self._get_args():
126  arg_strings.append(repr(arg))
127  for name, value in self._get_kwargs():
128  arg_strings.append('%s=%r' % (name, value))
129  return '%s(%s)' % (type_name, ', '.join(arg_strings))
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse._AttributeHolder.__repr__ (   self)

Definition at line 151 of file argparse.py.

References argparse._AttributeHolder.__repr__(), argparse._AttributeHolder._get_args(), argparse._AttributeHolder._get_kwargs(), and join().

152  def __repr__(self):
153  type_name = type(self).__name__
154  arg_strings = []
155  for arg in self._get_args():
156  arg_strings.append(repr(arg))
157  for name, value in self._get_kwargs():
158  arg_strings.append('%s=%r' % (name, value))
159  return '%s(%s)' % (type_name, ', '.join(arg_strings))
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def argparse._AttributeHolder._get_args (   self)
private

Definition at line 133 of file argparse.py.

Referenced by argparse._AttributeHolder.__repr__(), python.rootplot.argparse._AttributeHolder.__repr__(), and argparse._AttributeHolder._get_args().

134  def _get_args(self):
135  return []
136 
def argparse._AttributeHolder._get_args (   self)
private

Definition at line 163 of file argparse.py.

References python.multivaluedict.__init__(), argparse._ensure_value(), argparse._AttributeHolder._get_args(), and dbtoconf.object.

164  def _get_args(self):
165  return []
166 
def argparse._AttributeHolder._get_kwargs (   self)
private

Definition at line 130 of file argparse.py.

Referenced by argparse._AttributeHolder.__repr__(), python.rootplot.argparse._AttributeHolder.__repr__(), and argparse._AttributeHolder._get_kwargs().

131  def _get_kwargs(self):
132  return sorted(self.__dict__.items())
def argparse._AttributeHolder._get_kwargs (   self)
private

Definition at line 160 of file argparse.py.

References argparse._AttributeHolder._get_kwargs(), and argparse._sorted.

161  def _get_kwargs(self):
162  return _sorted(self.__dict__.items())