Your IP : 3.138.178.162
3
� f � @ s2 G d d� d�Z edkr.ddlmZ eddd� dS ) c @ s. e Zd Zd
dd�Zdd� Zdd� Zdd � ZdS )� DelegatorNc C s || _ t� | _d S )N)�delegate�set�_Delegator__cache)�selfr � r �6/opt/alt/python36/lib64/python3.6/idlelib/delegator.py�__init__ s zDelegator.__init__c C s( t | j|�}t| ||� | jj|� |S )N)�getattrr �setattrr �add)r �name�attrr r r �__getattr__ s zDelegator.__getattr__c C sB x2| j D ](}yt| |� W q tk
r. Y qX qW | j j� dS )z;Removes added attributes while leaving original attributes.N)r �delattr�AttributeError�clear)r �keyr r r �
resetcache s
zDelegator.resetcachec C s | j � || _dS )z%Reset attributes and change delegate.N)r r )r r r r r �setdelegate s zDelegator.setdelegate)N)�__name__�
__module__�__qualname__r r r r r r r r r s
r �__main__� )�mainz idlelib.idle_test.test_delegator� )� verbosityN)r r Zunittestr r r r r �<module> s