HEX
Server: Apache
System: Linux zacp120.webway.host 4.18.0-553.50.1.lve.el8.x86_64 #1 SMP Thu Apr 17 19:10:24 UTC 2025 x86_64
User: govancoz (1003)
PHP: 8.3.26
Disabled: exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
Upload Files
File: //lib/python3.6/site-packages/S3/__pycache__/SortedDict.cpython-36.pyc
3

�9peP�@s�ddlmZmZddlmZGdd�de�ZGdd�de�Zedkr�dd	d
ddd
�Z	ee	�Z
ed�eddd�xe
D]Zededd�qvWed�ee	dd�Z	ed�eddd�x e	j
�D]Zededd�q�Wed�dS)�)�absolute_import�print_function�)�BidirMapc@s*eZdZd	dd�Zdd�Zdd�ZeZdS)
�SortedDictIteratorFcCs"||_||_|rd|_nd|_dS)Nrr���)�sorted_dict�keys�	pop_index)�selfrr	�reverse�r
� /usr/lib/python3.6/SortedDict.py�__init__s
zSortedDictIterator.__init__cCs|S)Nr
)rr
r
r�__iter__szSortedDictIterator.__iter__cCs,y|jj|j�Stk
r&t�YnXdS)N)r	�popr
�
IndexError�
StopIteration)rr
r
r�__next__szSortedDictIterator.__next__N)F)�__name__�
__module__�__qualname__rrr�nextr
r
r
rrs
rcsBeZdZidfdd�Zdd�Zdd�Zdd	�Z�fd
d�Z�ZS)�
SortedDictTcKstj||f|�||_dS)a
        WARNING: SortedDict() with ignore_case==True will
                 drop entries differing only in capitalisation!
                 Eg: SortedDict({'auckland':1, 'Auckland':2}).keys() => ['Auckland']
                 With ignore_case==False it's all right
        N)�dictr�ignore_case)r�mappingr�kwargsr
r
rr&szSortedDict.__init__cs^tj|�}|jrNt��x|D]}|�|j�<qWt�j��}�fdd�|D�St|�}|SdS)Ncsg|]}�|�qSr
r
)�.0�k)�xlat_mapr
r�
<listcomp><sz#SortedDict.keys.<locals>.<listcomp>)rr	rr�lower�sorted)rr	�keyZlc_keysr
)r rr	0s

zSortedDict.keyscCst||j��S)N)rr	)rr
r
rrAszSortedDict.__iter__cCst||j�dd�S)NT)r)rr	)rr
r
r�__reversed__DszSortedDict.__reversed__csNt|t�r:t|jd�}x2|j�|D]}||||<q$Wntt|�j|�}|S)z0Override to support the "get_slice" for python3 )r)�
isinstance�slicerrr	�super�__getitem__)r�index�rr)�	__class__r
rr)Gs
zSortedDict.__getitem__)	rrrrr	rr%r)�
__classcell__r
r
)r,rr%s

r�__main__����)ZAWSZActionZamericaZAucklandZAmericaz8Wanted: Action, america, Auckland, AWS,    [ignore case]zGot:   � )�endz%s,z   [used: __iter__()]F)rzDWanted: AWS, Action, America, Auckland, america,    [case sensitive]z   [used: keys()]N)Z
__future__rrr�objectrrrr�dZsd�printr$r	r
r
r
r�<module>
s"-