Message355325
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. |
|
Date |
User |
Action |
Args |
2019-10-24 11:08:46 | jstasiak | set | recipients:
+ jstasiak, corona10 |
2019-10-24 11:08:46 | jstasiak | set | messageid: <1571915326.93.0.150606644361.issue38580@roundup.psfhosted.org> |
2019-10-24 11:08:46 | jstasiak | link | issue38580 messages |
2019-10-24 11:08:46 | jstasiak | create | |
|