File: //opt/plesk/python/3/lib64/python3.10/__pycache__/symtable.cpython-310.pyc
o
�᭲��� @ sX d Z ddlZddlmZmZmZmZmZmZmZm Z m
Z
mZmZm
Z
mZmZmZ ddlZg d�Zdd� ZG dd� d�Ze� ZG d d
� d
�ZG dd� de�ZG d
d� de�ZG dd� d�Zedkr�ddlZddlZeejd ��Ze� � Z!W d � n1 s~w Y ee!ej"�#ejd �d d�Z$e$�%� D ]Z&e$�'e&�Z(e)e(e(�*� e(�+� � q�dS dS )z2Interface to the compiler's internal symbol tables� N)�USE�
DEF_GLOBAL�DEF_NONLOCAL� DEF_LOCAL� DEF_PARAM�
DEF_IMPORT� DEF_BOUND� DEF_ANNOT� SCOPE_OFF�
SCOPE_MASK�FREE�LOCAL�GLOBAL_IMPLICIT�GLOBAL_EXPLICIT�CELL)�symtable�SymbolTable�Class�Function�Symbolc C s t �| ||�}t||�S )z� Return the toplevel *SymbolTable* for the source code.
*filename* is the name of the file with the code
and *compile_type* is the *compile()* mode argument.
)� _symtabler �_newSymbolTable)�code�filenameZcompile_type�top� r �0/opt/plesk/python/3/lib64/python3.10/symtable.pyr s
r c @ s$ e Zd Zdd� Zdd� Zdd� ZdS )�SymbolTableFactoryc C s t �� | _d S �N)�weakref�WeakValueDictionary�_SymbolTableFactory__memo��selfr r r �__init__ s zSymbolTableFactory.__init__c C s6 |j tjkrt||�S |j tjkrt||�S t||�S r )�typer �
TYPE_FUNCTIONr �
TYPE_CLASSr r )r# �tabler r r r �new s
zSymbolTableFactory.newc C s8 ||f}| j �|d �}|d u r| �||� }| j |<