관리-도구
편집 파일: structs.cpython-310.pyc
o ƚRe� � @ sb d dl Z ddlmZ G dd� de�ZG dd� dej�ZG dd � d e�ZG d d� de�Zdd � Z dS )� N� )�collections_abcc @ sp e Zd ZdZdd� Zdd� Zdd� Zdd � Zd d� Zdd � Z dd� Z dd� Zdd� Zdd� Z dd� Zdd� ZdS )� DirectedGraphz&A graph structure with directed edges.c C s t � | _i | _i | _d S �N)�set� _vertices� _forwards� _backwards��self� r ��/builddir/build/BUILDROOT/alt-python310-pip-21.3.1-3.el8.x86_64/opt/alt/python310/lib/python3.10/site-packages/pip/_vendor/resolvelib/structs.py�__init__ s zDirectedGraph.__init__c C � t | j�S r )�iterr r r r r �__iter__ � zDirectedGraph.__iter__c C r r )�lenr r r r r �__len__ r zDirectedGraph.__len__c C s || j v S r )r �r �keyr r r �__contains__ r zDirectedGraph.__contains__c C sB t � }t| j�|_dd� | j�� D �|_dd� | j�� D �|_|S )z$Return a shallow copy of this graph.c S � i | ] \}}|t |��qS r �r ��.0�k�vr r r � <dictcomp> � z&DirectedGraph.copy.<locals>.<dictcomp>c S r r r r r r r r r )r r r r �itemsr )r �otherr r r �copy s zDirectedGraph.copyc C s: || j v r td��| j �|� t� | j|<