summaryrefslogtreecommitdiffstats
path: root/Lib/selectors.py
diff options
context:
space:
mode:
authorYury Selivanov <yselivanov@sprymix.com>2016-03-02 15:43:45 (GMT)
committerYury Selivanov <yselivanov@sprymix.com>2016-03-02 15:43:45 (GMT)
commit3ebaea005dc6ab4a06fb585c23321b9bb0398b90 (patch)
treee602908fde19fd41f582b3ee27ac797f4018cabf /Lib/selectors.py
parent45c84cc0ca48d9b664c26971a3b527d60da80ceb (diff)
downloadcpython-3ebaea005dc6ab4a06fb585c23321b9bb0398b90.zip
cpython-3ebaea005dc6ab4a06fb585c23321b9bb0398b90.tar.gz
cpython-3ebaea005dc6ab4a06fb585c23321b9bb0398b90.tar.bz2
Sync selectors.py with upstream asyncio
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r--Lib/selectors.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py
index ecd8632..d8769e3 100644
--- a/Lib/selectors.py
+++ b/Lib/selectors.py
@@ -49,11 +49,12 @@ 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.
"""
-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.''')
+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."""