| Server IP : 127.0.0.1 / Your IP : 216.73.216.109 Web Server : Apache/2.4.54 (Win64) OpenSSL/1.1.1q PHP/8.1.10 System : Windows NT DESKTOP-E5T4RUN 10.0 build 19045 (Windows 10) AMD64 User : SERVERWEB ( 0) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : C:/cygwin64/lib/python3.6/__pycache__/ |
Upload File : |
3
C1�aj3 � @ s� d Z ddlZddlZddlZddlmZ ddlmZ ddddd d
ddgZG d
d� dej �Z
G dd� de�ZG dd� dee
�Z
dd� ZG dd� de
�ZG dd� de
�ZG dd
� d
e�ZG dd� de�ZG dd� de
�ZG dd � d e
�ZdS )z4Utilities for with-statement contexts. See PEP 343.� N)�deque)�wraps�contextmanager�closing�AbstractContextManager�ContextDecorator� ExitStack�redirect_stdout�redirect_stderr�suppressc @ 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.� )�selfr r � /usr/lib/python3.6/contextlib.py� __enter__ s z AbstractContextManager.__enter__c C s dS )z9Raise any exception triggered within the runtime context.Nr )r
�exc_type� exc_value� tracebackr r r �__exit__ s zAbstractContextManager.__exit__c C s | t krtj|dd�S tS )Nr r )r �_collections_abc�_check_methods�NotImplemented)�cls�Cr r r �__subclasshook__ s z'AbstractContextManager.__subclasshook__N)
�__name__�
__module__�__qualname__�__doc__r �abc�abstractmethodr �classmethodr r r r r r
s c @ s e Zd ZdZdd� Zdd� ZdS )r zJA base class or mixin that enables context managers to work as decorators.c C s | S )a6 Return a recreated instance of self.
Allows an otherwise one-shot context manager like
_GeneratorContextManager to support use as
a decorator via implicit recreation.
This is a private interface just for _GeneratorContextManager.
See issue #11647 for details.
r )r
r r r �_recreate_cm$ s
zContextDecorator._recreate_cmc s t � �� �fdd��}|S )Nc
s �j � � � | |�S Q R X d S )N)r! )�args�kwds)�funcr
r r �inner1 s
z(ContextDecorator.__call__.<locals>.inner)r )r
r$ r% r )r$ r
r �__call__0 s zContextDecorator.__call__N)r r r r r! r&