[Brett, about <http://www.python.org/sf/798046>] [Guido] > I seem to recall that that code has a long history of being hairy > and full of platform-specific issues, and I'd rather not see it > disturbed by an unspecific desire for more generalization. Why can't > the OP produce the input in the form of lists? They could, but they specifically already have Sets of socket objects. That's what C would have used too for select(), if it had sets, so it's a natural desire. The SF report notes that when read and write lists change frequently, it's a lot more efficient to add/remove sockets via O(1) Set operations. Under the covers, select() setup takes O(N) time even if the inputs are native list. Functions that expect input lists of reasonably small size (thousands, sure; millions, probably not) can usually be generalized to iterables easily, with little chance of disruption, by replacing initial "is it a list?" check with a call to PySequence_Fast(), then s/PyList_GetItem/PySequence_Fast_GET_ITEM/.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4