
    i                        % S r SSKJr  SSKrSSKJr  SSKJr  SSKJ	r	  SSKJ
r
  SS	KJr  SS
KJr  SSS jjr\" SS5      rS\S'   SS jrg)z0Functions for iterating over items in a mapping.    )annotationsN)
itemgetter   )KT)VT)	ItemsIter)Maplike)
MapOrItemsc             +    ^ #    [        T [        R                  5      (       a  T R                  5        Sh  vN   OB[        T [        5      (       a#  U 4S jT R                  5        5        Sh  vN   O
T  Sh  vN   [        R                  " [        [        [        4   UR                  5       5       Sh  vN   g N NP NG N7f)z7Yield the items from *arg* and *kw* in the order given.Nc              3  0   >#    U  H  oTU   4v   M     g 7f)N ).0kargs     I/home/admin/cozy_coffee/venv/lib/python3.13/site-packages/bidict/_iter.py	<genexpr>iteritems.<locals>.<genexpr>   s     4AAKs   )

isinstancetMappingitemsr	   keyscastr   r   r   )r   kws   ` r   	iteritemsr      s     #qyy!!99;	C	!	!4444vviB'444 	44sE   3CB=7C.B?/
C9C:=C7C8C?CCCzt.Finalswapc                    [        U SS5      n[        U5      (       a	  U" 5       nU$ [        [        [	        U 5      5      $ )a#  Yield the inverse items of the provided object.

If *arg* has a :func:`callable` ``__inverted__`` attribute,
return the result of calling it.

Otherwise, return an iterator over the items in `arg`,
inverting each item on the fly.

*See also* :attr:`bidict.BidirectionalMapping.__inverted__`
__inverted__N)getattrcallablemapr   r   )r   invattrinvs      r   invertedr$   $   s:     c>40G!(
tYs^$$    )r   )r   MapOrItems[KT, VT]r   r   returnzItemsIter[KT, VT])r   r&   r'   zItemsIter[VT, KT])__doc__
__future__r   typingr   operatorr   _typingr   r   r   r	   r
   r   r   __annotations__r$   r   r%   r   <module>r.      s?    7 "       5 1a g  %r%   