관리-도구
편집 파일: selectors.cpython-37.opt-2.pyc
B YI~d�H � @ s� d dl mZmZ d dlmZ d dlmZ d dlZd dlZd dl Z dZ dZdd� Zed d ddd g�Z de _e jdkr�de 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 d d!� d!e�Zeed"��rG d#d$� d$e�Zeed%��r6G d&d'� d'e�Zeed(��rRG d)d*� d*e�Zd*e� k�rdeZn:d$e� k�rveZn(d'e� k�r�eZnd!e� k�r�eZneZdS )+� )�ABCMeta�abstractmethod)� namedtuple)�MappingN� � c C sf t | t�r| }n<yt| �� �}W n* tttfk rJ td�| ��d �Y nX |dk rbtd�|���|S )NzInvalid file object: {!r}r zInvalid file descriptor: {})� isinstance�int�fileno�AttributeError� TypeError� ValueError�format)�fileobj�fd� r �./opt/alt/python37/lib64/python3.7/selectors.py�_fileobj_to_fd s r �SelectorKeyr 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 Zdd� Zdd� Zdd� Zdd� Zd S ) �_SelectorMappingc C s || _ d S )N)� _selector)�selfZselectorr r r �__init__? s z_SelectorMapping.__init__c C s t | jj�S )N)�lenr � _fd_to_key)r r r r �__len__B s z_SelectorMapping.__len__c C sB y| j �|�}| j j| S tk r< td�|��d �Y nX d S )Nz{!r} is not registered)r �_fileobj_lookupr �KeyErrorr )r r r r r r �__getitem__E s z_SelectorMapping.__getitem__c C s t | jj�S )N)�iterr r )r r r r �__iter__L s z_SelectorMapping.__iter__N)�__name__� __module__�__qualname__r r r"