[Python-bugs-list] [ python-Bugs-798046 ] select module doesn't allow any iterable.

SourceForge.net noreply at sourceforge.net
Tue Sep 2 12:23:47 EDT 2003


Bugs item #798046, was opened at 2003-08-31 07:31
Message generated for change (Comment added) made by arigo
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=798046&group_id=5470

Category: Python Library
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Jeremy Fincher (jemfinch)
Assigned to: Nobody/Anonymous (nobody)
Summary: select module doesn't allow any iterable.

Initial Comment:
The select module only allows lists, not any 
iterable.  While this may slightly increase efficiency 
for the select.select() function itself, for many 
applications passing select.select a sets.Set would 
probably be much more efficient (i.e., when things 
are being added/removed from the readable or 
writable lists quite often, the O(n) removal of lists 
would certainly be worse than the O(1) removal of 
sets.) 

----------------------------------------------------------------------

Comment By: Armin Rigo (arigo)
Date: 2003-09-02 18:23

Message:
Logged In: YES 
user_id=4771

Using select.poll() instead of select.select() might be a
good alternative, at least on platforms that support it, if
the sets are getting large enough for you to want to avoid
having to build lists explicitely as in :

    select.select(list(a), list(b), list(c))


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=798046&group_id=5470



More information about the Python-bugs-list mailing list