관리-도구
편집 파일: contextlib2.cpython-38.opt-1.pyc
U ��.eB � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddddd d ddd g Zedg7 Zej dd� dkrnej Zne�de fddi�Zdd� Zdd� ZG dd� de�ZG dd � d e �ZG dd� de�Zdd� ZG dd� de �ZG dd� de �ZG d d� de�ZG d!d� de�ZG d"d � d e �Zej d d#kZe�r@d$d%� Zd&d'� Znd(d%� Zd)d'� Zzdd*lmZ W n ek �rz eZ Y n X d+d,� Z G d-d � d e �Z!G d.d� de!�Z"G d/d� de�Z#dS )0zAcontextlib2 - backports and enhancements to the contextlib module� N)�deque��wraps�contextmanager�closing�nullcontext�AbstractContextManager�ContextDecorator� ExitStack�redirect_stdout�redirect_stderr�suppress�ContextStack� )� � �ABC� __slots__� c C s0 | |krd S |� | � | jD ]}t||� q|S �N)�append� __bases__�_classic_mro)�C�result�Br r �;/usr/lib/python3.8/site-packages/pip/_vendor/contextlib2.pyr s r c G sv z | j }W n" tk r, tt| g ��}Y nX |D ]>}|D ],}||jkr:|j| d krbt S q2q:t S q2dS )NT)�__mro__�AttributeError�tupler �__dict__�NotImplemented)r �methods�mro�methodr r r r �_check_methods$ s r% c @ s2 e Zd ZdZdd� Zejdd� �Zedd� �Z dS ) r z,An abstract base class for context managers.c C s | S )z0Return `self` upon entering the runtime context.r ��selfr r r � __enter__8 s z AbstractContextManager.__enter__c C s dS )z9Raise any exception triggered within the runtime context.Nr )r'