403Webshell
Server IP : 54.37.205.81  /  Your IP : 216.73.216.76
Web Server : nginx/1.22.1
System : Linux vps-249481fa 6.1.0-50-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.176-1 (2026-07-02) x86_64
User : debian ( 1000)
PHP Version : 8.2.32
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /lib/python3/dist-packages/nltk/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/nltk/__pycache__/decorators.cpython-311.pyc
�

 T�cS ����dZdZgd�ZddlZejdd�Zd�ejD��e_ddlZee_d�Zd�Zdd�Z	d	�Z
d
�Zd�Zd�Z
d
�Ze
d���ZdS)a
Decorator module by Michele Simionato <michelesimionato@libero.it>
Copyright Michele Simionato, distributed under the terms of the BSD License (see below).
http://www.phyast.pitt.edu/~micheles/python/documentation.html

Included in NLTK for its support of a nice memoization decorator.
zrestructuredtext en)�	decorator�new_wrapper�getinfo�Nc�8�g|]}|�dt|��v�|��S)�nltk)�str)�.0�ps  �1/usr/lib/python3/dist-packages/nltk/decorators.py�
<listcomp>rs-��>�>�>�!�1�>��s�1�v�v�)=�)=�A�)=�)=�)=�c�p�t|��dd��d��}t|��D]h\}}|�d��dkr3|d|�d������||<�Q|���||<�id�|��S)z�
    For retrocompatibility reasons, we don't use a standard Signature.
    Instead, we use the string generated by this method.
    Basically, from a Signature we create a string and remove the default values.
    �����,�=rz, )r�split�	enumerate�count�index�strip�join)�	signature�
listsignature�counter�params    r�__legacysignaturers����	�N�N�1�R�4�(�.�.�s�3�3�M�#�M�2�2�3�3�����;�;�s���a���%*�1�u�{�{�3�/?�/?�+?�%@�%F�%F�%H�%H�M�'�"�"�%*�[�[�]�]�M�'�"�"��9�9�]�#�#�#r
c��tj|��stj|��sJ�tj|��}|dd�\}}}t	|��}|r|�|��|r|�|��tj|��}t|��}t|d��r|j	}|j
}	n|j}|j}	t|j||||j|j|j|j|	|��
�
S)a�
    Returns an info dictionary containing:
    - name (the name of the function : str)
    - argnames (the names of the arguments : list)
    - defaults (the values of the default arguments : tuple)
    - signature (the signature : str)
    - fullsignature (the full signature : Signature)
    - doc (the docstring : str)
    - module (the module name : str)
    - dict (the function __dict__ : str)

    >>> def f(self, x=1, y=2, *args, **kw): pass

    >>> info = getinfo(f)

    >>> info["name"]
    'f'
    >>> info["argnames"]
    ['self', 'x', 'y', 'args', 'kw']

    >>> info["defaults"]
    (1, 2)

    >>> info["signature"]
    'self, x, y, *args, **kw'

    >>> info["fullsignature"]
    <Signature (self, x=1, y=2, *args, **kw)>
    N��__closure__)
�name�argnamesr�
fullsignature�defaults�doc�module�dict�globals�closure)�inspect�ismethod�
isfunction�getfullargspec�list�appendrr�hasattrr �__globals__�func_closure�func_globalsr'�__name__�__defaults__�__doc__�
__module__�__dict__)
�func�argspec�regargs�varargs�	varkwargsr"r#r�_closure�_globalss
          rrr,s!��<��D�!�!�=�W�%7��%=�%=�=�=�=��$�T�*�*�G�")�"�1�"�+��G�W�i��G�}�}�H��!����� � � ��#����	�"�"�"��%�d�+�+�M�!�-�0�0�I��t�]�#�#�%��#���#����$���$���
�]���#��"��L���
�]������r
c���|pt|��}|d|_|d|_|d|_|j�|d��|d|_||_|S)z akin to functools.update_wrapperr!r%r&r'r$)rr4r6r7r8�updater5�undecorated)�wrapper�model�infodicts   r�update_wrapperrFlsm���)�7�5�>�>�H���'�G���u�o�G�O�!�(�+�G������H�V�,�-�-�-�#�J�/�G���G���Nr
c���t|t��r|}nt|��}d|dvs
Jd���d|z}t|t|�����}t	|||��S)aA
    An improvement over functools.update_wrapper. The wrapper is a generic
    callable object. It works by generating a copy of the wrapper with the
    right signature and by updating the copy, not the original.
    Moreovoer, 'model' can be a dictionary with keys 'name', 'doc', 'module',
    'dict', 'defaults'.
    �	_wrapper_r"z("_wrapper_" is a reserved argument name!z.lambda %(signature)s: _wrapper_(%(signature)s))rH)�
isinstancer'r�evalrF)rCrDrE�src�funcopys     rrrxs���%����"�����5�>�>���8�J�/�/�/�/�1�
0�/�/�
:�X�
E�C��3��w�/�/�/�0�0�G��'�5�(�3�3�3r
c�.���t��fd����S)Nc�&���j�g|�Ri|��S�N)�call)�a�kr9�selfs  ��r�<lambda>z__call__.<locals>.<lambda>�s#���y�t�y��'?��'?�'?�'?�Q�'?�'?�r
)r)rSr9s``r�__call__rU�s!�����?�?�?�?�?��F�F�Fr
c��tt|����}d|vrtd���d|vrtd���t|_|S)z�
    Take a class with a ``.caller`` method and return a callable decorator
    object. It works by adding a suitable __call__ method to the class;
    it raises a TypeError if the class already has a nontrivial __call__
    method.
    rUz=You cannot decorate a class with a nontrivial __call__ methodrPz2You cannot decorate a class without a .call method)�set�dir�	TypeErrorrU)�cls�attrss  r�decorator_factoryr\�s]��
��C���M�M�E��U����N�
�
�	
��U����O�P�P�P��C�L��Jr
c�t��tj���rt���S�fd�}t|���S)a�
    General purpose decorator factory: takes a caller function as
    input and returns a decorator with the same attributes.
    A caller function is any function like this::

     def caller(func, *args, **kw):
         # do something
         return func(*args, **kw)

    Here is an example of usage:

    >>> @decorator
    ... def chatty(f, *args, **kw):
    ...     print("Calling %r" % f.__name__)
    ...     return f(*args, **kw)

    >>> chatty.__name__
    'chatty'

    >>> @chatty
    ... def f(): pass
    ...
    >>> f()
    Calling 'f'

    decorator can also take in input a class with a .caller method; in this
    case it converts the class into a factory of callable decorator objects.
    See the documentation for an example.
    c���t|��}|d}d|vsd|vr
Jd���d|z}t|t|������}t|||��S)Nr"�_call_�_func_z2You cannot use _call_ or _func_ as argument names!z3lambda %(signature)s: _call_(_func_, %(signature)s))r`r_)rrJr'rF)r9rEr"rK�dec_func�callers     �r�
_decoratorzdecorator.<locals>._decorator�sv����4�=�=���J�'���� � �H��$8�$8�$8�?�%9�$8�$8�C�h�N����T��f�=�=�=�>�>���h��h�7�7�7r
)r*�isclassr\rF)rbrcs` rrr�sP���<��v���)� ��(�(�(�	8�	8�	8�	8�	8��*�f�-�-�-r
c�~�	t||��S#t$r |��}t|||��|cYSwxYw)z'Similar to .setdefault in dictionaries.)�getattr�AttributeError�setattr)�objr!�
default_thunk�defaults    r�getattr_rl�sX����s�D�!�!�!�������-�/�/����T�7�#�#�#��������s��'<�<c�^�t|dt��}||vr||S||�}|||<|S)N�memoize_dic)rlr')r9�args�dic�results    r�memoizerr�s?��
�4���
-�
-�C��s�{�{��4�y��
�T�4�[�F��C��I��Mr
rO)r6�
__docformat__�__all__�sys�path�OLD_SYS_PATHr*rrrFrrUr\rrlrr�r
r�<module>rys����&�
�2�
1�
1��
�
�
�
��x����{��>�>�s�x�>�>�>����������$�$�$�=�=�=�@	�	�	�	�4�4�4�*G�G�G����$,.�,.�,.�^����������r

Youez - 2016 - github.com/yon3zu
LinuXploit