CMS 3D CMS Logo

List of all members | Public Member Functions | Private Member Functions
argparse._AttributeHolder Class Reference
Inheritance diagram for argparse._AttributeHolder:
argparse.Action argparse.ArgumentParser argparse.Namespace argparse._AppendAction argparse._AppendConstAction argparse._CountAction argparse._HelpAction argparse._StoreAction argparse._StoreConstAction argparse._SubParsersAction argparse._SubParsersAction._ChoicesPseudoAction argparse._VersionAction

Public Member Functions

def __repr__ (self)
 

Private Member Functions

def _get_args (self)
 
def _get_kwargs (self)
 

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

Member Function Documentation

def argparse._AttributeHolder.__repr__ (   self)

Definition at line 151 of file argparse.py.

References argparse._AttributeHolder._get_args(), python.rootplot.argparse._AttributeHolder._get_args(), argparse._AttributeHolder._get_kwargs(), python.rootplot.argparse._AttributeHolder._get_kwargs(), python.rootplot.argparse.Action._get_kwargs(), python.rootplot.argparse.ArgumentParser._get_kwargs(), and join().

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

Definition at line 163 of file argparse.py.

Referenced by argparse._AttributeHolder.__repr__().

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

Definition at line 160 of file argparse.py.

References argparse._sorted.

Referenced by argparse._AttributeHolder.__repr__().

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