;
?c        
   @   s!  d  Z  d k Z d k l Z l Z l Z l Z l Z l Z l	 Z	 d k
 l Z e e f Z d d d d d d	 d
 d d d g
 Z d e i f d     YZ d e i f d     YZ d f  d     YZ d e f d     YZ d e f d     YZ d e f d     YZ d e f d     YZ [ d S(   s   Weak reference support for Python.

This module is an implementation of PEP 205:

http://python.sourceforge.net/peps/pep-0205.html
N(   s   getweakrefcounts   getweakrefss   refs   proxys   CallableProxyTypes	   ProxyTypes   ReferenceType(   s   ReferenceErrors   refs   proxys   getweakrefcounts   getweakrefss   WeakKeyDictionarys   ReferenceTypes	   ProxyTypes   CallableProxyTypes
   ProxyTypess   WeakValueDictionaryc           B   s   t  Z d  Z d   Z d   Z d   Z d   Z e d  Z d   Z	 d   Z
 d   Z e Z d	   Z d
   Z d   Z d   Z d   Z d   Z d   Z RS(   s   Mapping class that references values weakly.

    Entries in the dictionary will be discarded when no strong
    reference to the value exists anymore
    c         C   s2   |  i |   } | t j o t |  n | Sd  S(   N(   s   selfs   datas   keys   os   Nones   KeyError(   s   selfs   keys   o(    (    s$   /mit/python/lib/python2.3/weakref.pys   __getitem__-   s    c         C   s   d t  |   Sd  S(   Ns   <WeakValueDictionary at %s>(   s   ids   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   __repr__4   s    c         C   s#   t  | |  i |   |  i | <d  S(   N(   s   refs   values   selfs    _WeakValueDictionary__makeremoves   keys   data(   s   selfs   keys   value(    (    s$   /mit/python/lib/python2.3/weakref.pys   __setitem__7   s    c         C   sU   t    } xA |  i i   D]0 \ } } |   } | t j	 o | | | <q q W| Sd  S(   N(	   s   WeakValueDictionarys   news   selfs   datas   itemss   keys   wrs   os   None(   s   selfs   os   wrs   keys   new(    (    s$   /mit/python/lib/python2.3/weakref.pys   copy:   s    	 	c         C   sQ   y |  i | } Wn t j
 o | Sn$ X|   } | t j o | Sn | Sd  S(   N(   s   selfs   datas   keys   wrs   KeyErrors   defaults   os   None(   s   selfs   keys   defaults   os   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   getB   s    		c         C   s[   g  } xJ |  i i   D]9 \ } } |   } | t j	 o | i | | f  q q W| Sd  S(   N(	   s   Ls   selfs   datas   itemss   keys   wrs   os   Nones   append(   s   selfs   Ls   os   wrs   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   itemsO   s     	c         C   s   t  |   Sd  S(   N(   s   WeakValuedItemIterators   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys	   iteritemsW   s    c         C   s   |  i i   Sd  S(   N(   s   selfs   datas   iterkeys(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   iterkeysZ   s    c         C   s   t  |   Sd  S(   N(   s   WeakValuedValueIterators   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys
   itervalues^   s    c         C   sL   xE n o= |  i i   \ } } |   } | t j	 o | | f Sq q
 Wd  S(   Ni   (   s   selfs   datas   popitems   keys   wrs   os   None(   s   selfs   os   wrs   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   popitema   s     	c         G   sg   y |  i i |    } Wn) t j
 o | o | d Sn   n X| t j o t |  n | Sd  S(   Ni    (   s   selfs   datas   pops   keys   os   KeyErrors   argss   None(   s   selfs   keys   argss   o(    (    s$   /mit/python/lib/python2.3/weakref.pys   poph   s    c         C   sU   y |  i | } Wn6 t j
 o* t | |  i |   |  i | <| Sn	 X|   Sd  S(   N(   s   selfs   datas   keys   wrs   KeyErrors   refs   defaults    _WeakValueDictionary__makeremove(   s   selfs   keys   defaults   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys
   setdefaultt   s    	c         C   sF   |  i } x6 | i   D]( \ } } t | |  i |   | | <q Wd  S(   N(	   s   selfs   datas   ds   dicts   itemss   keys   os   refs    _WeakValueDictionary__makeremove(   s   selfs   dicts   ds   os   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   update}   s    	 c         C   sO   g  } x> |  i i   D]- } |   } | t j	 o | i |  q q W| Sd  S(   N(   s   Ls   selfs   datas   valuess   wrs   os   Nones   append(   s   selfs   Ls   os   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   values   s     	c         C   s   t  |   | d  } | Sd  S(   Nc         C   s(   |   } | t j	 o | i | =n d  S(   N(   s   selfrefs   selfs   Nones   datas   key(   s   os   selfrefs   keys   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   remove   s    	(   s   refs   selfs   keys   remove(   s   selfs   keys   remove(    (    s$   /mit/python/lib/python2.3/weakref.pys   __makeremove   s    (   s   __name__s
   __module__s   __doc__s   __getitem__s   __repr__s   __setitem__s   copys   Nones   gets   itemss	   iteritemss   iterkeyss   __iter__s
   itervaluess   popitems   pops
   setdefaults   updates   valuess    _WeakValueDictionary__makeremove(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakValueDictionary!   s"    														c           B   s   t  Z d  Z e d  Z d   Z d   Z d   Z d   Z d   Z	 e d  Z
 d   Z d	   Z d
   Z d   Z d   Z e Z d   Z d   Z d   Z d   Z d   Z d   Z RS(   s   Mapping class that references keys weakly.

    Entries in the dictionary will be discarded when there is no
    longer a strong reference to the key. This can be used to
    associate additional data with an object owned by other parts of
    an application without adding attributes to those objects. This
    can be especially useful with objects that override attribute
    accesses.
    c         C   sF   h  |  _ t |   d  } | |  _ | t j	 o |  i |  n d  S(   Nc         C   s(   |   } | t j	 o | i |  =n d  S(   N(   s   selfrefs   selfs   Nones   datas   k(   s   ks   selfrefs   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   remove   s    	(   s   selfs   datas   refs   removes   _removes   dicts   Nones   update(   s   selfs   dicts   remove(    (    s$   /mit/python/lib/python2.3/weakref.pys   __init__   s
    		 c         C   s   |  i t |  =d  S(   N(   s   selfs   datas   refs   key(   s   selfs   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   __delitem__   s    c         C   s   |  i t |  Sd  S(   N(   s   selfs   datas   refs   key(   s   selfs   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   __getitem__   s    c         C   s   d t  |   Sd  S(   Ns   <WeakKeyDictionary at %s>(   s   ids   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   __repr__   s    c         C   s   | |  i t | |  i  <d  S(   N(   s   values   selfs   datas   refs   keys   _remove(   s   selfs   keys   value(    (    s$   /mit/python/lib/python2.3/weakref.pys   __setitem__   s    c         C   sU   t    } xA |  i i   D]0 \ } } |   } | t j	 o | | | <q q W| Sd  S(   N(	   s   WeakKeyDictionarys   news   selfs   datas   itemss   keys   values   os   None(   s   selfs   values   os   keys   new(    (    s$   /mit/python/lib/python2.3/weakref.pys   copy   s    	 	c         C   s   |  i i t |  |  Sd  S(   N(   s   selfs   datas   gets   refs   keys   default(   s   selfs   keys   default(    (    s$   /mit/python/lib/python2.3/weakref.pys   get   s    c         C   s;   y t  |  } Wn t j
 o d Sn X| |  i j Sd  S(   Ni    (   s   refs   keys   wrs	   TypeErrors   selfs   data(   s   selfs   keys   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   has_key   s
    	c         C   s;   y t  |  } Wn t j
 o d Sn X| |  i j Sd  S(   Ni    (   s   refs   keys   wrs	   TypeErrors   selfs   data(   s   selfs   keys   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   __contains__   s
    	c         C   s[   g  } xJ |  i i   D]9 \ } } |   } | t j	 o | i | | f  q q W| Sd  S(   N(	   s   Ls   selfs   datas   itemss   keys   values   os   Nones   append(   s   selfs   Ls   values   os   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   items   s     	c         C   s   t  |   Sd  S(   N(   s   WeakKeyedItemIterators   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys	   iteritems   s    c         C   s   t  |   Sd  S(   N(   s   WeakKeyedKeyIterators   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   iterkeys   s    c         C   s   |  i i   Sd  S(   N(   s   selfs   datas
   itervalues(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys
   itervalues   s    c         C   sO   g  } x> |  i i   D]- } |   } | t j	 o | i |  q q W| Sd  S(   N(   s   Ls   selfs   datas   keyss   wrs   os   Nones   append(   s   selfs   Ls   os   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   keys   s     	c         C   sL   xE n o= |  i i   \ } } |   } | t j	 o | | f Sq q
 Wd  S(   Ni   (   s   selfs   datas   popitems   keys   values   os   None(   s   selfs   os   values   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   popitem   s     	c         G   s   |  i i t |  |  Sd  S(   N(   s   selfs   datas   pops   refs   keys   args(   s   selfs   keys   args(    (    s$   /mit/python/lib/python2.3/weakref.pys   pop   s    c         C   s#   |  i i t | |  i  |  Sd  S(   N(   s   selfs   datas
   setdefaults   refs   keys   _removes   default(   s   selfs   keys   default(    (    s$   /mit/python/lib/python2.3/weakref.pys
   setdefault   s    c         C   s@   |  i } x0 | i   D]" \ } } | | t | |  i  <q Wd  S(   N(	   s   selfs   datas   ds   dicts   itemss   keys   values   refs   _remove(   s   selfs   dicts   ds   values   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   update   s    	 (   s   __name__s
   __module__s   __doc__s   Nones   __init__s   __delitem__s   __getitem__s   __repr__s   __setitem__s   copys   gets   has_keys   __contains__s   itemss	   iteritemss   iterkeyss   __iter__s
   itervaluess   keyss   popitems   pops
   setdefaults   update(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakKeyDictionary   s(   	 																s   BaseIterc           B   s   t  Z d   Z RS(   Nc         C   s   |  Sd  S(   N(   s   self(   s   self(    (    s$   /mit/python/lib/python2.3/weakref.pys   __iter__   s    (   s   __name__s
   __module__s   __iter__(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   BaseIter   s   s   WeakKeyedKeyIteratorc           B   s   t  Z d   Z d   Z RS(   Nc         C   s   | i i   i |  _ d  S(   N(   s   weakdicts   datas   iterkeyss   nexts   selfs   _next(   s   selfs   weakdict(    (    s$   /mit/python/lib/python2.3/weakref.pys   __init__   s    c         C   s=   x6 n o. |  i   } |   } | t j	 o | Sq q
 Wd  S(   Ni   (   s   selfs   _nexts   wrs   objs   None(   s   selfs   objs   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   next  s     	(   s   __name__s
   __module__s   __init__s   next(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakKeyedKeyIterator   s   	s   WeakKeyedItemIteratorc           B   s   t  Z d   Z d   Z RS(   Nc         C   s   | i i   i |  _ d  S(   N(   s   weakdicts   datas	   iteritemss   nexts   selfs   _next(   s   selfs   weakdict(    (    s$   /mit/python/lib/python2.3/weakref.pys   __init__
  s    c         C   sI   xB n o: |  i   \ } } |   } | t j	 o | | f Sq q
 Wd  S(   Ni   (   s   selfs   _nexts   wrs   values   keys   None(   s   selfs   keys   wrs   value(    (    s$   /mit/python/lib/python2.3/weakref.pys   next  s     	(   s   __name__s
   __module__s   __init__s   next(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakKeyedItemIterator	  s   	s   WeakValuedValueIteratorc           B   s   t  Z d   Z d   Z RS(   Nc         C   s   | i i   i |  _ d  S(   N(   s   weakdicts   datas
   itervaluess   nexts   selfs   _next(   s   selfs   weakdict(    (    s$   /mit/python/lib/python2.3/weakref.pys   __init__  s    c         C   s=   x6 n o. |  i   } |   } | t j	 o | Sq q
 Wd  S(   Ni   (   s   selfs   _nexts   wrs   objs   None(   s   selfs   objs   wr(    (    s$   /mit/python/lib/python2.3/weakref.pys   next  s     	(   s   __name__s
   __module__s   __init__s   next(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakValuedValueIterator  s   	s   WeakValuedItemIteratorc           B   s   t  Z d   Z d   Z RS(   Nc         C   s   | i i   i |  _ d  S(   N(   s   weakdicts   datas	   iteritemss   nexts   selfs   _next(   s   selfs   weakdict(    (    s$   /mit/python/lib/python2.3/weakref.pys   __init__"  s    c         C   sI   xB n o: |  i   \ } } |   } | t j	 o | | f Sq q
 Wd  S(   Ni   (   s   selfs   _nexts   keys   wrs   values   None(   s   selfs   values   wrs   key(    (    s$   /mit/python/lib/python2.3/weakref.pys   next%  s     	(   s   __name__s
   __module__s   __init__s   next(    (    (    s$   /mit/python/lib/python2.3/weakref.pys   WeakValuedItemIterator!  s   	(   s   __doc__s   UserDicts   _weakrefs   getweakrefcounts   getweakrefss   refs   proxys   CallableProxyTypes	   ProxyTypes   ReferenceTypes
   exceptionss   ReferenceErrors
   ProxyTypess   __all__s   WeakValueDictionarys   WeakKeyDictionarys   BaseIters   WeakKeyedKeyIterators   WeakKeyedItemIterators   WeakValuedValueIterators   WeakValuedItemIterator(   s   WeakKeyedItemIterators   CallableProxyTypes   WeakKeyDictionarys   BaseIters   __all__s	   ProxyTypes   UserDicts   getweakrefcounts   WeakValueDictionarys   getweakrefss
   ProxyTypess   proxys   WeakValuedItemIterators   WeakKeyedKeyIterators   ReferenceTypes   refs   ReferenceErrors   WeakValuedValueIterator(    (    s$   /mit/python/lib/python2.3/weakref.pys   ?   s   	1	$qf