diff options
author | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
---|---|---|
committer | Raymond Hettinger <python@rcn.com> | 2015-08-18 05:04:45 (GMT) |
commit | 5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3 (patch) | |
tree | 4bb326ec6a4e0bdac1585d09db97611f905ee29a /Lib/selectors.py | |
parent | 02aa3426d393642999bb4f0e1a3125b9391ca399 (diff) | |
download | cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.zip cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.gz cpython-5b798abf5b56887d8dcde4e9fa82e405ef4b1dd3.tar.bz2 |
Issue #24878: Add docstrings to selected namedtuples
Diffstat (limited to 'Lib/selectors.py')
-rw-r--r-- | Lib/selectors.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/Lib/selectors.py b/Lib/selectors.py index 6d569c3..ecd8632 100644 --- a/Lib/selectors.py +++ b/Lib/selectors.py @@ -43,9 +43,17 @@ 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. +""" +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.""" |