o
    uyi	                     @   sT   d dl mZmZmZmZmZmZmZmZ edZ	edZ
G dd dee	e
f ZdS )    )DictIteratorMappingOptionalSequenceTypeVarUnioncastKVc                   @   s   e Zd ZdZdZdeeeeef   fddZ	de
eef fddZd	edefd
dZdee fddZdefddZde
eef fddZdS )LazyDictz1Lazily build a dictionary from an array of items.	_contents_dictcontentsc                 C   s   || _ d | _d S )Nr   )selfr    r   [/home/ubuntu/maya3_transcribe/venv/lib/python3.10/site-packages/pyiceberg/utils/lazydict.py__init__,   s   
zLazyDict.__init__returnc                 C   sV   i | _ | jD ]!}| j ttttt |d d d ttt |dd d  q| j S )N      )	r   r   updatedictzipr	   r   r
   r   )r   itemr   r   r   _build_dict0   s   
@zLazyDict._build_dictkeyc                C   s   | j p|  }|| S )z#Return the value for the given key.r   r   )r   r   sourcer   r   r   __getitem__7      zLazyDict.__getitem__c                 C      | j p|  }t|S )z3Return an iterator over the keys of the dictionary.)r   r   iterr   r   r   r   r   __iter__<   r!   zLazyDict.__iter__c                 C   r"   )z-Return the number of items in the dictionary.)r   r   lenr$   r   r   r   __len__A   r!   zLazyDict.__len__c                 C   s   | j p|  S )z Convert the lazy dict in a dict.r   )r   r   r   r   __dict__F   s   zLazyDict.__dict__N)__name__
__module____qualname____doc__	__slots__r   r   r
   r   r   r   r   r    r   r%   intr'   r(   r   r   r   r   r   !   s    r   N)typingr   r   r   r   r   r   r   r	   r
   r   r   r   r   r   r   <module>   s   (