Файловый менеджер - Редактировать - /opt/imh-python/lib/python3.9/site-packages/zmq/__pycache__/decorators.cpython-39.pyc
Ðазад
a a�hz � @ sl d Z dZddlmZ ddlZddlmZ G dd� de�ZG dd � d e�Z G d d� de�Z dd � Zdd� ZdS )ai Decorators for running functions with context/sockets. .. versionadded:: 15.3 Like using Contexts and Sockets as context managers, but with decorator syntax. Context and sockets are closed at the end of the function. For example:: from zmq.decorators import context, socket @context() @socket(zmq.PUSH) def work(ctx, push): ... )�context�socket� ��wrapsN)� basestringc @ s2 e Zd ZdZddd�Zdd� Zdd� Zd d � ZdS )� _DecoratorzThe mini decorator factoryNc C s || _ d S �N��_target)�self�target� r �~/root/rpmbuild/BUILDROOT/imh-python39-modules-3.9.7-92.el8.x86_64/opt/imh-python/lib/python3.9/site-packages/zmq/decorators.py�__init__# s z_Decorator.__init__c s, �j � i ���\�� �� ���fdd�}|S )a� The main logic of decorator Here is how those arguments works:: @out_decorator(*dec_args, *dec_kwargs) def func(*wrap_args, **wrap_kwargs): ... And in the ``wrapper``, we simply create ``self.target`` instance via ``with``:: target = self.get_target(*args, **kwargs) with target(*dec_args, **dec_kwargs) as obj: ... c s t � ���� ��fdd��}|S )Nc s� �j | i |��}|� i ����^}�r6�|vr6||�<