Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Member Functions
argparse._AttributeHolder Class Reference
Inheritance diagram for argparse._AttributeHolder:
Inheritance graph
Collaboration diagram for argparse._AttributeHolder:
Collaboration graph

List of all members.

Public Member Functions

def __repr__

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Private Member Functions

def _get_kwargs
def _get_args

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

Member Function Documentation

Definition at line 121 of file

00122     def __repr__(self):
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))

Here is the call graph for this function:

def argparse._AttributeHolder._get_args (   self) [private]

Definition at line 133 of file

00134     def _get_args(self):
00135         return []

Here is the caller graph for this function:

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

Reimplemented in argparse.ArgumentParser, and argparse.Action.

Definition at line 130 of file

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

Here is the call graph for this function:

Here is the caller graph for this function:

Member Data Documentation

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

The documentation for this class was generated from the following file: