Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Attributes
idlelib.Delegator.Delegator Class Reference
Inheritance diagram for idlelib.Delegator.Delegator:
Inheritance graph
[legend]

List of all members.

Public Member Functions

def __init__
def __getattr__
def resetcache
def cachereport
def setdelegate
def getdelegate

Public Attributes

 delegate

Private Attributes

 __cache

Detailed Description

Definition at line 1 of file Delegator.py.


Constructor & Destructor Documentation

def idlelib.Delegator.Delegator.__init__ (   self,
  delegate = None 
)

Definition at line 5 of file Delegator.py.

00005 
00006     def __init__(self, delegate=None):
00007         self.delegate = delegate
00008         self.__cache = {}

Here is the caller graph for this function:


Member Function Documentation

def idlelib.Delegator.Delegator.__getattr__ (   self,
  name 
)

Definition at line 9 of file Delegator.py.

00009 
00010     def __getattr__(self, name):
00011         attr = getattr(self.delegate, name) # May raise AttributeError
00012         setattr(self, name, attr)
00013         self.__cache[name] = attr
00014         return attr

Here is the call graph for this function:

Definition at line 23 of file Delegator.py.

00023 
00024     def cachereport(self):
00025         keys = list(self.__cache.keys())
00026         keys.sort()
00027         print(keys)

Definition at line 32 of file Delegator.py.

00032 
00033     def getdelegate(self):
00034         return self.delegate

Definition at line 15 of file Delegator.py.

00015 
00016     def resetcache(self):
00017         for key in self.__cache:
00018             try:
00019                 delattr(self, key)
00020             except AttributeError:
00021                 pass
00022         self.__cache.clear()

Here is the caller graph for this function:

def idlelib.Delegator.Delegator.setdelegate (   self,
  delegate 
)

Reimplemented in idlelib.ColorDelegator.ColorDelegator, and idlelib.UndoDelegator.UndoDelegator.

Definition at line 28 of file Delegator.py.

00028 
00029     def setdelegate(self, delegate):
00030         self.resetcache()
00031         self.delegate = delegate

Here is the call graph for this function:


Member Data Documentation

Definition at line 7 of file Delegator.py.

Definition at line 6 of file Delegator.py.


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