Back to index

python3.2  3.2.2
Public Member Functions | Private Member Functions | Static Private Attributes
bundlebuilder.Defaults Class Reference
Inheritance diagram for bundlebuilder.Defaults:
Inheritance graph

List of all members.

Public Member Functions

def __init__

Private Member Functions

def _getDefaults

Static Private Attributes

tuple _getDefaults = classmethod(_getDefaults)

Detailed Description

Class attributes that don't start with an underscore and are
not functions or classmethods are (deep)copied to self.__dict__.
This allows for mutable default values.

Definition at line 43 of file

Constructor & Destructor Documentation

def bundlebuilder.Defaults.__init__ (   self,

Definition at line 50 of file

00051     def __init__(self, **kwargs):
00052         defaults = self._getDefaults()
00053         defaults.update(kwargs)
00054         self.__dict__.update(defaults)

Here is the caller graph for this function:

Member Function Documentation

def bundlebuilder.Defaults._getDefaults (   cls) [private]

Definition at line 55 of file

00056     def _getDefaults(cls):
00057         defaults = {}
00058         for base in cls.__bases__:
00059             if hasattr(base, "_getDefaults"):
00060                 defaults.update(base._getDefaults())
00061         for name, value in list(cls.__dict__.items()):
00062             if name[0] != "_" and not isinstance(value,
00063                     (function, classmethod)):
00064                 defaults[name] = deepcopy(value)
        return defaults

Here is the call graph for this function:

Member Data Documentation

Definition at line 65 of file

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