관리-도구
편집 파일: Delegator.cpython-35.opt-1.pyc
��Yf � @ sC Gd d � d � Z e d k r? d d l m Z e d d d �d S) c @ sC e Z d Z d d d � Z d d � Z d d � Z d d � Z d S) � DelegatorNc C s | | _ t � | _ d S)N)�delegate�set�_Delegator__cache)�selfr � r �6/opt/alt/python35/lib64/python3.5/idlelib/Delegator.py�__init__ s zDelegator.__init__c C s6 t | j | � } t | | | � | j j | � | S)N)�getattrr �setattrr �add)r �name�attrr r r �__getattr__ s zDelegator.__getattr__c C sK x7 | j D], } y t | | � Wq t k r5 Yq Xq W| j j � d S)z;Removes added attributes while leaving original attributes.N)r �delattr�AttributeError�clear)r �keyr r r � resetcache s zDelegator.resetcachec C s | j � | | _ d S)z%Reset attributes and change delegate.N)r r )r r r r r �setdelegate s zDelegator.setdelegate)�__name__� __module__�__qualname__r r r r r r r r r s r �__main__� )�mainz idlelib.idle_test.test_delegator� verbosity� N)r r Zunittestr r r r r �<module> s