403Webshell
Server IP : 217.160.0.135  /  Your IP : 216.73.217.85
Web Server : Apache
System : Linux www 6.18.52-i1-ampere #1203 SMP Mon Sep 14 18:29:59 CEST 2026 aarch64
User : sws1074145052 ( 1074145052)
PHP Version : 8.3.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /usr/lib/python3/dist-packages/prompt_toolkit/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /usr/lib/python3/dist-packages/prompt_toolkit/__pycache__/cache.cpython-311.pyc
�

�Ïc���h�ddlmZddlmZddlmZmZmZmZm	Z	m
Z
mZmZm
Z
gd�Zede
���Zed��ZGd�d	e	eef��Zed
ee
df���Zed��ZGd
�deeef��Zededef���Zddedeegeffd�ZdS)�)�deque)�wraps)	�Any�Callable�Deque�Dict�Generic�Hashable�Tuple�TypeVar�cast)�SimpleCache�
FastDictCache�memoized�_T)�bound�_Uc�P�eZdZdZddeddfd�Zdedegefdefd	�Z	dd
�Z
dS)
rz�
    Very simple cache that discards the oldest item when the cache size is
    exceeded.

    :param maxsize: Maximum size of the cache. (Don't make it too big.)
    ��maxsize�returnNc�X�|dksJ�i|_t��|_||_dS�Nr)�_datar�_keysr)�selfrs  �6/usr/lib/python3/dist-packages/prompt_toolkit/cache.py�__init__zSimpleCache.__init__s,����{�{�{�{�#%��
� %����
�#������key�getter_funcc�,�	|j|S#t$rz|��}||j|<|j�|��t	|j��|jkr*|j���}||jvr|j|=|cYSwxYw)z�
        Get object from the cache.
        If not found, call `getter_func` to resolve it, and put that on the top
        of the cache instead.
        )r�KeyErrorr�append�lenr�popleft)rr r!�value�
key_to_removes     r�getzSimpleCache.gets���	��:�c�?�"���	�	�	��K�M�M�E�#�D�J�s�O��J���c�"�"�"��4�:�����-�-� $�
� 2� 2� 4� 4�
� �D�J�.�.��
�=�1��L�L�L�	���s��BB�Bc�:�i|_t��|_dS)zClear cache.N)rrr)rs r�clearzSimpleCache.clear5s����
��W�W��
�
�
r)r)rN)�__name__�
__module__�__qualname__�__doc__�intrrrrr)r+�rrrrs���������$�$��$�D�$�$�$�$��r����R��(8��R�����.�����rr�_K.�_Vc�H�eZdZdZddedefdeddfd�Zd	edefd
�Z	dS)ra�
    Fast, lightweight cache which keeps at most `size` items.
    It will discard the oldest items in the cache first.

    The cache is a dictionary, which doesn't keep track of access counts.
    It is perfect to cache little immutable objects which are not expensive to
    create, but where a dictionary lookup is still much faster than an object
    instantiation.

    :param get_value: Callable that's called in case of a missing key.
    �@B�	get_value.�sizerNc�X�|dksJ�t��|_||_||_dSr)rrr6r7)rr6r7s   rrzFastDictCache.__init__Ts,���a�x�x�x�x� %����
�"�����	�	�	rr c���t|��|jkr |j���}||vr||=|j|�}|||<|j�|��|S�N)r%r7rr&r6r$)rr r(�results    r�__missing__zFastDictCache.__missing__[sm���t�9�9�t�y� � � �J�.�.�0�0�M���$�$���'�����%����S�	��
���#�����
r)r5)
r,r-r.r/rr3r0rr2r<r1rrrr?sw������
�
�(��(�3��7�"3��3��T�����
�r�
�b�
�
�
�
�
�
rr�_F�rrc�0��dtdtf�fd�}|S)zI
    Memoization decorator for immutable classes and pure functions.
    �objrc�����t�����t���dtdtdtf��fd���}tt|��S)N)r�a�kwrc�����dtf���fd�}�tt��������f}��||��S)Nrc�����i���Sr:r1)rBrCr@s���r�
create_newzEmemoized.<locals>.decorator.<locals>.new_callable.<locals>.create_newus����s�A�}��}�}�$r)r�tuple�sorted�itemsr))rBrCrFr �cacher@s``  ��r�new_callablez1memoized.<locals>.decorator.<locals>.new_callablessl�����
%��
%�
%�
%�
%�
%�
%�
%�
%��e�F�2�8�8�:�:�.�.�/�/�0�C��9�9�S�*�-�-�-r)rrrr
r=)r@rKrJrs` @�r�	decoratorzmemoized.<locals>.decoratorpso�����,7��,H�,H�,H��	�s���	.�S�	.��	.��	.�	.�	.�	.�	.�	.�
��	.��B��%�%�%r)r=)rrLs` rrrks7���
&�r�&�b�&�&�&�&�&�&��rN)r>)�collectionsr�	functoolsr�typingrrrrr	r
rrr
�__all__rrrr2r3r�objectr=r0rr1rr�<module>rRs���������������V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�V�����
�W�T��"�"�"���W�T�]�]��)�)�)�)�)�'�"�b�&�/�)�)�)�X
�W�T��x��}�-�.�.�.���W�T�]�]��&�&�&�&�&�D��R��L�&�&�&�R
�W�T��#�v�+�.�/�/�/����c��X�r�d�B�h�%7������r

Youez - 2016 - github.com/yon3zu
LinuXploit