This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jstasiak
Recipients corona10, jstasiak
Date 2019-10-24.11:08:46
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org>
In-reply-to
Content
Excerpt from the documentation:

"""This is a straightforward interface to the Unix select() system call. The first three arguments are sequences of ‘waitable objects’: either integers representing file descriptors or objects with a parameterless method named fileno() returning such an integer:"""

In reality it accepts for example dictionary key views (that's how I discovered it) due to its internal usage of PySequence_Fast, which (from https://docs.python.org/3/c-api/sequence.html#c.PySequence_Fast):

"""Return the sequence or iterable o as an object usable by the other PySequence_Fast* family of functions. If the object is not a sequence or iterable, raises TypeError with m as the message text. Returns NULL on failure."""

I made a pull request to document this behavior in select (https://github.com/python/cpython/pull/16832) but it was recommended that I create this issue because the solution may not be obvious here.
History
Date User Action Args
2019-10-24 11:08:46jstasiaksetrecipients: + jstasiak, corona10
2019-10-24 11:08:46jstasiaksetmessageid: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org>
2019-10-24 11:08:46jstasiaklinkissue38580 messages
2019-10-24 11:08:46jstasiakcreate