ok
Direktori : /lib64/python3.6/__pycache__/ |
Current File : //lib64/python3.6/__pycache__/ast.cpython-36.pyc |
3 \�/ � @ s� d Z ddlT d!dd�ZeeefZdd� Zd"dd�Zd d� Z dd� Z d#dd�Zdd� Zdd� Z d$dd�Zdd� ZG dd� de�ZG dd� de�Zd S )%aH ast ~~~ The `ast` module helps Python applications to process trees of the Python abstract syntax grammar. The abstract syntax itself might change with each Python release; this module helps to find out programmatically what the current grammar looks like and allows modifications of it. An abstract syntax tree can be generated by passing `ast.PyCF_ONLY_AST` as a flag to the `compile()` builtin function or by using the `parse()` function from this module. The result will be a tree of objects whose classes all inherit from `ast.AST`. A modified abstract syntax tree can be compiled into a Python code object using the built-in `compile()` function. Additionally various helper functions are provided that make working with the trees simpler. The main intention of the helper functions and this module in general is to provide an easy to use interface for libraries that work tightly with the python syntax (template engines for example). :copyright: Copyright 2008 by Armin Ronacher. :license: Python License. � )�*� <unknown>�execc C s t | ||t�S )zn Parse the source into an AST node. Equivalent to compile(source, filename, mode, PyCF_ONLY_AST). )�compileZ PyCF_ONLY_AST)�source�filename�mode� r �/usr/lib64/python3.6/ast.py�parse s r c s: t | t�rt| dd�} t | t�r&| j} � fdd�� � | �S )a Safely evaluate an expression node or a string containing a Python expression. The string or node provided may only consist of the following Python literal structures: strings, bytes, numbers, tuples, lists, dicts, sets, booleans, and None. �eval)r c s� t | t�r| jS t | ttf�r$| jS t | t�r4| jS t | t�rNt t � | j��S t | t�rht t � | j��S t | t�r�tt � | j��S t | t�r�t� fdd�t| j| j�D ��S t | t�r�| jS t | t�o�t | jttf��r � | j�}t |t��rrt | jt��r| S | S nht | t��rrt | jttf��rr� | j�}� | j �}t |t��rrt |t��rrt | jt��rj|| S || S t!dt"| � ��d S )Nc 3 s"