File: //home/arjun/projects/env/lib/python3.10/site-packages/docx/opc/__pycache__/shared.cpython-310.pyc
o
$we� � @ s2 d Z G dd� de�Zdedefdd�Zdd� Zd S )
zObjects shared by opc modules.c s8 e Zd ZdZ� fdd�Z� fdd�Z� fdd�Z� ZS )�CaseInsensitiveDictaL Mapping type that behaves like dict except that it matches without respect to the
case of the key.
E.g. cid['A'] == cid['a']. Note this is not general-purpose, just complete enough to
satisfy opc package needs. It assumes str keys, and that it is created empty; keys
passed in constructor are not accounted for
c � t t| ��|�� �S �N)�superr �__contains__�lower��self�key�� __class__� �H/home/arjun/projects/env/lib/python3.10/site-packages/docx/opc/shared.pyr
� z CaseInsensitiveDict.__contains__c r r )r r �__getitem__r r r
r r
r r zCaseInsensitiveDict.__getitem__c s t t| ��|�� |�S r )r r �__setitem__r )r r �valuer
r r
r s zCaseInsensitiveDict.__setitem__)�__name__�
__module__�__qualname__�__doc__r r r �
__classcell__r r r
r
r s
r �cls�method_namec C s
t | |�S )z,Return method of `cls` having `method_name`.)�getattr)r r r r r
�
cls_method_fn s
r c s* d�j � �j}� �fdd�}t||d�S )z�@lazyprop decorator.
Decorated method will be called only on first access to calculate a cached property
value. After that, the cached value is returned.
z_%sc s8 zt | � �W S ty �| �}t| � |� | Y S w r )r �AttributeError�setattr)�objr ��cache_attr_name�fr r
�get_prop_value% s �z$lazyproperty.<locals>.get_prop_value)�doc)r r �property)r � docstringr! r r r
�lazyproperty s
r% N)r �dictr �type�strr r% r r r r
�<module> s