CMS 3D CMS Logo

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

List of all members.

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.

00122                       :
00123         type_name = type(self).__name__
00124         arg_strings = []
00125         for arg in self._get_args():
00126             arg_strings.append(repr(arg))
00127         for name, value in self._get_kwargs():
00128             arg_strings.append('%s=%r' % (name, value))
00129         return '%s(%s)' % (type_name, ', '.join(arg_strings))

def argparse::_AttributeHolder::__repr__ (   self)

Definition at line 151 of file argparse.py.

00151                       :
00152         type_name = type(self).__name__
00153         arg_strings = []
00154         for arg in self._get_args():
00155             arg_strings.append(repr(arg))
00156         for name, value in self._get_kwargs():
00157             arg_strings.append('%s=%r' % (name, value))
00158         return '%s(%s)' % (type_name, ', '.join(arg_strings))
00159 
def argparse::_AttributeHolder::_get_args (   self) [private]

Definition at line 163 of file argparse.py.

00163                        :
00164         return []
00165 
00166 
def argparse::_AttributeHolder::_get_args (   self) [private]

Definition at line 133 of file argparse.py.

00134                        :
00135         return []
00136 

def argparse::_AttributeHolder::_get_kwargs (   self) [private]

Reimplemented in argparse::Action, argparse::ArgumentParser, argparse::Action, and argparse::ArgumentParser.

Definition at line 130 of file argparse.py.

00131                          :
00132         return sorted(self.__dict__.items())

def argparse::_AttributeHolder::_get_kwargs (   self) [private]

Reimplemented in argparse::Action, argparse::ArgumentParser, argparse::Action, and argparse::ArgumentParser.

Definition at line 160 of file argparse.py.

00160                          :
00161         return _sorted(self.__dict__.items())
00162