AlkantarClanX12
Current Path : /opt/alt/python310/lib64/python3.10/__pycache__/ |
Current File : //opt/alt/python310/lib64/python3.10/__pycache__/selectors.cpython-310.opt-2.pyc |
o 6��fPL � @ s� d dl mZmZ d dlmZ d dlmZ d dlZd dlZd dl Z dZ dZdd� Zed g d ��Z de _e jdkrHd e j_de j_de j_de j_G dd� de�ZG dd� ded�ZG dd� de�ZG dd� de�ZG dd� de�Zeed�r~G dd� de�Zeed�r�G d d!� d!e�Zeed"�r�G d#d$� d$e�Zeed%�r�G d&d'� d'e�Zd(d)� Zed%�r�eZdS ed�r�eZdS ed"�r�eZdS ed�r�eZdS eZdS )*� )�ABCMeta�abstractmethod)� namedtuple)�MappingN� � c C sb t | t�r | }nzt| �� �}W n tttfy# td�| ��d �w |dk r/td�|���|S )NzInvalid file object: {!r}r zInvalid file descriptor: {})� isinstance�int�fileno�AttributeError� TypeError� ValueError�format)�fileobj�fd� r �0/opt/alt/python310/lib64/python3.10/selectors.py�_fileobj_to_fd s ���r �SelectorKey)r r �events�dataz�SelectorKey(fileobj, fd, events, data) Object used to associate a file object to its backing file descriptor, selected event mask, and attached data. )� � zFile object registered.zUnderlying file descriptor.z3Events that must be waited for on this file object.zzOptional opaque data associated to this file object. For example, this could be used to store a per-client session ID.c @ s. e Zd Z dd� Zdd� Zdd� Zdd� Zd S ) �_SelectorMappingc C s || _ d S �N)� _selector)�self�selectorr r r �__init__@ � z_SelectorMapping.__init__c C � t | jj�S r )�lenr � _fd_to_key�r r r r �__len__C � z_SelectorMapping.__len__c C s: z | j �|�}| j j| W S ty td�|��d �w �N�{!r} is not registered)r �_fileobj_lookupr"