diff options
author | Jakub Stasiak <jakub@stasiak.at> | 2020-05-25 07:03:48 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-05-25 07:03:48 (GMT) |
commit | 372ee27d4958302dac7ad6a8711f6fd04771b2e6 (patch) | |
tree | 082686687d1b4acb858ff12163bd0e32236d2b85 /Doc/library/select.rst | |
parent | cba503151056b448b7a3730dc36ef6655550ade5 (diff) | |
download | cpython-372ee27d4958302dac7ad6a8711f6fd04771b2e6.zip cpython-372ee27d4958302dac7ad6a8711f6fd04771b2e6.tar.gz cpython-372ee27d4958302dac7ad6a8711f6fd04771b2e6.tar.bz2 |
bpo-38580: Document that select() accepts iterables, not just sequences (GH-16832)
Diffstat (limited to 'Doc/library/select.rst')
-rw-r--r-- | Doc/library/select.rst | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/select.rst b/Doc/library/select.rst index bb28095..a354187 100644 --- a/Doc/library/select.rst +++ b/Doc/library/select.rst @@ -117,7 +117,7 @@ The module defines the following: .. function:: select(rlist, wlist, xlist[, timeout]) This is a straightforward interface to the Unix :c:func:`select` system call. - The first three arguments are sequences of 'waitable objects': either + The first three arguments are iterables of 'waitable objects': either integers representing file descriptors or objects with a parameterless method named :meth:`~io.IOBase.fileno` returning such an integer: @@ -126,7 +126,7 @@ The module defines the following: * *xlist*: wait for an "exceptional condition" (see the manual page for what your system considers such a condition) - Empty sequences are allowed, but acceptance of three empty sequences is + Empty iterables are allowed, but acceptance of three empty iterables is platform-dependent. (It is known to work on Unix but not on Windows.) The optional *timeout* argument specifies a time-out as a floating point number in seconds. When the *timeout* argument is omitted the function blocks until @@ -141,7 +141,7 @@ The module defines the following: single: socket() (in module socket) single: popen() (in module os) - Among the acceptable object types in the sequences are Python :term:`file + Among the acceptable object types in the iterables are Python :term:`file objects <file object>` (e.g. ``sys.stdin``, or objects returned by :func:`open` or :func:`os.popen`), socket objects returned by :func:`socket.socket`. You may also define a :dfn:`wrapper` class yourself, |