Back to index

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

List of all members.

Public Member Functions

def __init__
def __eq__
def __ne__
def __contains__
def __repr__

Public Attributes

_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Simple object for storing attributes.

Implements equality by attribute names and values, and provides a simple
string representation.

Definition at line 1156 of file

Constructor & Destructor Documentation

def argparse.Namespace.__init__ (   self,

Definition at line 1163 of file

01164     def __init__(self, **kwargs):
01165         for name in kwargs:
01166             setattr(self, name, kwargs[name])

Here is the caller graph for this function:

Member Function Documentation

def argparse.Namespace.__contains__ (   self,

Definition at line 1173 of file

01174     def __contains__(self, key):
01175         return key in self.__dict__

def argparse.Namespace.__eq__ (   self,

Definition at line 1167 of file

01168     def __eq__(self, other):
01169         return vars(self) == vars(other)

Here is the caller graph for this function:

def argparse.Namespace.__ne__ (   self,

Definition at line 1170 of file

01171     def __ne__(self, other):
01172         return not (self == other)

def argparse._AttributeHolder.__repr__ (   self) [inherited]

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:

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: