AlkantarClanX12
Current Path : /lib64/python3.6/__pycache__/ |
Current File : //lib64/python3.6/__pycache__/selectors.cpython-36.opt-1.pyc |
3 \�K � @ s� d Z ddlmZmZ ddlmZmZ ddlZddlZddl Z d)Z d*Zdd� Zedd d ddg�Z d e _ e jd+kr�de j_ de j_ de j_ de j_ G dd� de�ZG dd� ded�ZG dd� de�ZG dd� de�Zeed�r�G dd� de�Zeed ��rG d!d"� d"e�Zeed#��r"G d$d%� d%e�Zeed&��r>G d'd(� d(e�Zd(e� k�rPeZn:d"e� k�rbeZn(d%e� k�rteZnde� k�r�eZneZdS ),z|Selectors module. This module allows high-level and efficient I/O multiplexing, built upon the `select` module primitives. � )�ABCMeta�abstractmethod)� namedtuple�MappingN� c C sf t | t�r| }n<yt| j� �}W n* tttfk rJ tdj| ��d�Y nX |dk rbtdj|���|S )z�Return a file descriptor from a file object. Parameters: fileobj -- file object or file descriptor Returns: corresponding file descriptor Raises: ValueError if the object is invalid zInvalid file object: {!r}Nr zInvalid file descriptor: {})� isinstance�int�fileno�AttributeError� TypeError� ValueError�format)�fileobj�fd� r �!/usr/lib64/python3.6/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 @ s0 e Zd ZdZdd� Zdd� Zdd� Zdd � Zd S )�_SelectorMappingz)Mapping of file objects to selector keys.c C s || _ d S )N)� _selector)�selfZselectorr r r �__init__>