ó
–‰]c           @@  sJ   d  d l  m Z d  d l m Z d  d l m Z d e f d „  ƒ  YZ d S(   i    (   t   absolute_import(   t   copy(   t
   deprecatedt
   StyleProxyc           B@  sq   e  Z d  Z d Z d „  Z d „  Z d „  Z d „  Z d „  Z d „  Z	 e
 d ƒ d	 „  ƒ Z d
 „  Z d „  Z RS(   sA   
    Proxy formatting objects so that they cannot be altered
    t   __targetc         C@  s   | |  _  d  S(   N(   t   _StyleProxy__target(   t   selft   target(    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __init__   s    c         C@  s   t  |  j ƒ S(   N(   t   reprR   (   R   (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __repr__   s    c         C@  s   t  |  j | ƒ S(   N(   t   getattrR   (   R   t   attr(    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __getattr__   s    c         C@  s8   | d k r t  d ƒ ‚ n  t t |  ƒ j | | ƒ d  S(   NR   sP   Style objects are immutable and cannot be changed.Reassign the style with a copy(   t   AttributeErrort   superR   t   __setattr__(   R   R   t   value(    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyR      s    c         C@  s   t  |  j ƒ S(   s6   
        Return a copy of the proxied object.
        (   R   R   (   R   (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __copy__#   s    c         C@  s   |  j  | S(   sW   
        Add proxied object to another instance and return the combined object
        (   R   (   R   t   other(    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __add__*   s    s,   Use copy(obj) or cell.obj = cell.obj + otherc         K@  s@   t  |  j ƒ } x* | j ƒ  D] \ } } t | | | ƒ q W| S(   sH   Return a copy of the proxied object. Keyword args will be passed through(   R   R   t   itemst   setattr(   R   t   kwt   cpt   kt   v(    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyR   1   s    c         C@  s   |  j  | k S(   N(   R   (   R   R   (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __eq__:   s    c         C@  s   |  | k S(   N(    (   R   R   (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   __ne__>   s    (   t   __name__t
   __module__t   __doc__t	   __slots__R   R
   R   R   R   R   R   R   R   R   (    (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyR   	   s   								N(   t
   __future__R    R   t   openpyxl.compatR   t   objectR   (    (    (    s4   lib/python2.7/site-packages/openpyxl/styles/proxy.pyt   <module>   s   