← Back
Editing: decorators.cpython-311.pyc
� mc�c� � � � d Z dZddlmZ ddlZ G d� d� � Z G d� de� � Z G d � d e� � Zd� Zd� Z dS ) 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� ��wrapsNc �, � e Zd ZdZdd�Zd� Zd� Zd� ZdS )� _DecoratorzThe mini decorator factoryNc � � || _ d S �N��_target)�self�targets �0/usr/lib/python3/dist-packages/zmq/decorators.py�__init__z_Decorator.__init__"