Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
_weakrefset._IterationGuard Class Reference

List of all members.

Public Member Functions

def __init__
def __enter__
def __exit__

Public Attributes

 weakcontainer

Detailed Description

Definition at line 10 of file _weakrefset.py.


Constructor & Destructor Documentation

def _weakrefset._IterationGuard.__init__ (   self,
  weakcontainer 
)

Definition at line 16 of file _weakrefset.py.

00016 
00017     def __init__(self, weakcontainer):
00018         # Don't create cycles
00019         self.weakcontainer = ref(weakcontainer)

Here is the caller graph for this function:


Member Function Documentation

Definition at line 20 of file _weakrefset.py.

00020 
00021     def __enter__(self):
00022         w = self.weakcontainer()
00023         if w is not None:
00024             w._iterating.add(self)
00025         return self

def _weakrefset._IterationGuard.__exit__ (   self,
  e,
  t,
  b 
)

Definition at line 26 of file _weakrefset.py.

00026 
00027     def __exit__(self, e, t, b):
00028         w = self.weakcontainer()
00029         if w is not None:
00030             s = w._iterating
00031             s.remove(self)
00032             if not s:
00033                 w._commit_removals()
00034 

Here is the caller graph for this function:


Member Data Documentation

Definition at line 18 of file _weakrefset.py.


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