Your IP : 216.73.216.196
B
�s�W�9 � @ sL d Z ddlZddlZddlmZ ddlmZ ddddd d
dgZedg7 ZG d
d� de�Z G dd� de �Z
dd� ZG dd� de�ZG dd� de�Z
G dd � d e
�ZG dd
� d
e
�ZG dd� de�Zejd dkZer�dd� Zdd� Zndd� Zdd� ZyddlmZ W n ek
�r eZY n
X dd � ZG d!d� de�ZG d"d� de�ZdS )#zAcontextlib2 - backports and enhancements to the contextlib module� N)�deque)�wraps�contextmanager�closing�ContextDecorator� ExitStack�redirect_stdout�redirect_stderr�suppress�ContextStackc @ s( e Zd ZdZdd� Zdd� Zdd� ZdS ) r zJA base class or mixin that enables context managers to work as decorators.c C s t �dt� | �� S )a� Returns the context manager used to actually wrap the call to the
decorated function.
The default implementation just returns *self*.
Overriding this method allows otherwise one-shot context managers
like _GeneratorContextManager to support use as decorators via
implicit recreation.
DEPRECATED: refresh_cm was never added to the standard library's
ContextDecorator API
z2refresh_cm was never added to the standard library)�warnings�warn�DeprecationWarning�_recreate_cm)�self� r �</opt/alt/python37/lib/python3.7/site-packages/contextlib2.py�
refresh_cm s
zContextDecorator.refresh_cmc 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 r "