Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/dill/__pycache__/pointers.cpython-39.pyc
Ðазад
a h�hs � @ s` g d �Z ddlZddlZddlmZ ddlmZ ddd�Zdd d �Z ddd�Z ddd�ZeZdS ))�parent� reference�at�parents�children� N� )� _proxy_helper)�_locate_object� c C s* d}t | |||�}|�� }|| u r&dS |S )al >>> listiter = iter([4,5,6,7]) >>> obj = parent(listiter, list) >>> obj == [4,5,6,7] # actually 'is', but don't have handle any longer True NOTE: objtype can be a single type (e.g. int or list) or a tuple of types. WARNING: if obj is a sequence (e.g. list), may produce unexpected results. Parent finds *one* parent (e.g. the last member of the sequence). r N)r �pop)�obj�objtype�ignore�depth�chainr r r �}/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/dill/pointers.pyr s r c sP t j}� fdd�}t|d�s"|fn|}dd� |D �}t| |||�ddd� }|S )z�Find the chain of referents for obj. Chain will end with obj. objtype: an object type or tuple of types to search for depth: search depth (e.g. depth=2 is 'grandparents') ignore: an object or tuple of objects to ignore in the search c s t | � �S �N�� isinstance��x�r r r �<lambda>- � zparents.<locals>.<lambda>�__len__c s s | ]}t |�V qd S r ��id��.0r r r r � <genexpr>0 r zparents.<locals>.<genexpr>N���)�gcZ get_referents�hasattr� find_chain�r r r r � edge_func� predicater r r r r % s r c sH t j}� fdd�}t|d�s"|fn|}dd� |D �}t| ||||�}|S )a Find the chain of referrers for obj. Chain will start with obj. objtype: an object type or tuple of types to search for depth: search depth (e.g. depth=2 is 'grandchildren') ignore: an object or tuple of objects to ignore in the search NOTE: a common thing to ignore is all globals, 'ignore=(globals(),)' NOTE: repeated calls may yield different results, as python stores the last value in the special variable '_'; thus, it is often good to execute something to replace '_' (e.g. >>> 1+1). c s t | � �S r r r r r r r D r zchildren.<locals>.<lambda>r c s s | ]}t |�V qd S r r r r r r r G r zchildren.<locals>.<genexpr>)r! Z get_referrersr"