Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/cherrypy/lib/__pycache__/gctools.cpython-39.pyc
Ðазад
a v�h� � @ s� d dl Z d dlZd dlZd dlZzd dlZW n eyB dZY n0 d dlZd dlmZmZ d dl m Z G dd� de�Zdd� Z G dd � d e �Zeej�Ze�� d d� ZG dd � d e�ZdS )� N)� _cprequest�_cpwsgi)�SimplePluginc @ sB e Zd ZdZdZddd�Zdd d �Zdd� Zddd�Zdd� Z dS )�ReferrerTreezDAn object which gathers all referrers of an object to a given depth.�( N� � c C s, |pg | _ | j �t�� j� || _|| _d S )N)�ignore�append�inspect�currentframe�f_back�maxdepth� maxparents)�selfr r r � r ��/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/cherrypy/lib/gctools.py�__init__ s zReferrerTree.__init__� c C s� |d7 }g }t �|�}| j�|� t|�| jkrBdt|� g fgS z| jj}W n tyj | jj j }Y n0 |D ]V}t�|�r�|j |u r�qp|| jv r�qp|| jkr�|�|| �||�f� qp|�|g f� qp|S )z>Return a nested list containing referrers of the given object.r z[%s referrers])�gcZ get_referrersr r �lenr �ascend�__code__�AttributeErrorZim_func� func_coder �isframe�f_coder )r �obj�depth�parents�refsZ ascendcode�parentr r r r s&