summaryrefslogtreecommitdiffstats
path: root/Lib/selectors.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-03-02 15:37:59 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-03-02 15:37:59 (GMT)
commit0c6a34409ea9cf9a82171da09801f086d472aa89 (patch)
treecfe507d828dd09b72819e5bf134dcf3b617738ca /Lib/selectors.py
parent049205f6463a6653160d43ee9c80880b8fababc0 (diff)
downloadcpython-0c6a34409ea9cf9a82171da09801f086d472aa89.zip
cpython-0c6a34409ea9cf9a82171da09801f086d472aa89.tar.gz
cpython-0c6a34409ea9cf9a82171da09801f086d472aa89.tar.bz2
asyncio, selectors: Update to the upstream version
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r--Lib/selectors.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py
index 6d569c3..d8769e3 100644
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -43,9 +43,18 @@ def _fileobj_to_fd(fileobj):
SelectorKey = namedtuple('SelectorKey', ['fileobj', 'fd', 'events', 'data'])
-"""Object used to associate a file object to its backing file descriptor,
-selected event mask and attached data."""
+SelectorKey.__doc__ = """SelectorKey(fileobj, fd, events, data)
+
+ Object used to associate a file object to its backing
+ file descriptor, selected event mask, and attached data.
+"""
+if sys.version_info >= (3, 5):
+ SelectorKey.fileobj.__doc__ = 'File object registered.'
+ SelectorKey.fd.__doc__ = 'Underlying file descriptor.'
+ SelectorKey.events.__doc__ = 'Events that must be waited for on this file object.'
+ SelectorKey.data.__doc__ = ('''Optional opaque data associated to this file object.
+ For example, this could be used to store a per-client session ID.''')
class _SelectorMapping(Mapping):
"""Mapping of file objects to selector keys."""