Your IP : 3.139.79.187
�
h f�K �
@ s" d Z d d l m Z m Z m Z m Z m Z m Z m Z d d l m
Z
m Z d d l Z d d l
Z
d d l Z e e f Z d d d d d d
d d d
d d d d g
Z Gd d � d e � Z Gd d � d e j � Z Gd d � d e � Z Gd d � d e j � Z Gd d � d � Z d S)z{Weak reference support for Python.
This module is an implementation of PEP 205:
http://www.python.org/dev/peps/pep-0205/
� )�getweakrefcount�getweakrefs�ref�proxy�CallableProxyType� ProxyType�
ReferenceType)�WeakSet�_IterationGuardNr r r r �WeakKeyDictionaryr r r �
ProxyTypes�WeakValueDictionaryr �
WeakMethod�finalizec s^ e Z d Z d Z d Z d d d � Z � f d d
� Z d d � Z d
d � Z e j
Z
� S)r z�
A custom `weakref.ref` subclass which simulates a weak reference to
a bound method, working around the lifetime problem of bound methods.
� _func_ref�
_meth_type�_alive�__weakref__Nc s� y | j } | j } Wn0 t k
rH t d j t | � � � d � Yn X� � f d d � } t j | | | � } t | | � | _ t | � | _ d | _
t | � � | S)Nz)argument should be a bound method, not {}c s; � � } | j r7 d | _ � d k r7 � | � q7 n d S)NF)r )�arg�self)�callback�self_wr� �,/opt/alt/python34/lib64/python3.4/weakref.py�_cb2 s
zWeakMethod.__new__.<locals>._cbT)�__self__�__func__�AttributeError� TypeError�format�typer �__new__r r r )�cls�methr �obj�funcr r r )r r r r! + s
zWeakMethod.__new__c sG t � j � } | j � } | d k s3 | d k r7 d S| j | | � S)N)�super�__call__r r )r r$ r% )� __class__r r r'