WeakDict's: addressing CPython's problem with cyclic structures 
Author Message
 WeakDict's: addressing CPython's problem with cyclic structures

WeakDict (Weak Dictionaries) have been designed to address
CPythons problems with cyclic references.
More precisely, WeakDict's allow the realization
of weak references, references that are **NOT** counted in
the reference count and can therefore be used to build
cyclic structures without obstructing the reference counting

This might be interesting e.g. for the DOM implementation of
the XML-SIG. Other applications include object maps and
caches of various kinds.

WeakDict's are very similar to normal python dictionaries,
with the following essential exceptions:

 - all values in a WeakDict must be instances of 'WeakValue'
   (or a derived class)

 - the reference to a value in a WeakDict is *NOT* counted
   in the reference count of the value.
   Thus, it does not prevent the value from being garbaged collected.

 - When a value is garbaged collected, the corresponding
   entry disappears from the WeakDict.

More information and download:
        URL: http://www.*-*-*.com/ ~dieter/weakdict.html

----------- comp.lang.python.announce (moderated) ----------

Python Language Home Page:   http://www.*-*-*.com/
Python Quick Help Index:     http://www.*-*-*.com/

Thu, 31 May 2001 03:00:00 GMT  
 [ 1 post ] 

 Relevant Pages 

1. two definitions of 'cyclic'?

2. Effective address to 'segmented' address

3. stream('file','c','seek ='x) problem

4. Address command 'rx test.rexx'

5. "Xx'Address" problem

6. Using MASM32's GUID structure problem....

7. 'pstruct' structure parser and python

8. Overloaded '=' operator on a structured type

9. Problem with ''Mailbox''

10. methods in 'C' - persistent data structures

11. Address of 'Lisp Pointers', perhaps Germany


Powered by phpBB® Forum Software