View file File name : _weakrefset.cpython-36.pyc Content :3 \I � @ s2 d dl mZ dgZG dd� d�ZG dd� d�ZdS )� )�ref�WeakSetc @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�_IterationGuardc C s t |�| _d S )N)r � weakcontainer)�selfr � r �#/usr/lib64/python3.6/_weakrefset.py�__init__ s z_IterationGuard.__init__c C s | j � }|d k r|jj| � | S )N)r � _iterating�add)r �wr r r � __enter__ s z_IterationGuard.__enter__c C s0 | j � }|d k r,|j}|j| � |s,|j� d S )N)r r �remove�_commit_removals)r �e�t�br �sr r r �__exit__ s z_IterationGuard.__exit__N)�__name__� __module__�__qualname__r r r r r r r r s r c @ s e Zd Zd>dd�Zdd� Zdd� Zdd � Zd d� Zdd � Zdd� Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� Zdd� Zdd� ZeZd d!� Zd"d#� Zd$d%� ZeZd&d'� Zd(d)� Zd*d+� ZeZd,d-� Zd.d/� ZeZd0d1� Zd2d3� Zd4d5� Z e Z!d6d7� Z"d8d9� Z#d:d;� Z$e$Z%d<d=� Z&dS )?r Nc C sB t � | _t| �fdd�}|| _g | _t � | _|d k r>| j|� d S )Nc S s2 |� }|d k r.|j r"|jj| � n|jj| � d S )N)r �_pending_removals�append�data�discard)�item�selfrefr r r r �_remove&