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 brett.cannon
Recipients
Date 2003-09-06.22:22:01
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
Logged In: YES 
user_id=357491

There seems to be two things that are preventing the use of an 
object that supports the iterator protocol instead of a list.  One is 
the explicit check that the arguments are lists; PyList_Check is run 
on the passed-in lists for a basic sanity check.  Then there is a call 
to a function called list2set that takes in a Python list and then 
sets the passed-in fd_set properly.  In that function there is 
nothing that screams "we should only use lists" beyond it allows 
assuming a list and thus doesn't have any hoops to jump through.

But the iterator protocol was set up to minimize hoop jumping.  
There seems to be little stopping a move over to using the iterator 
protocol beyond a minimial amount of recoding to rip out the list 
check to replace it with PyIter_Check and instead of using a 'for' 
loop through a list you just use a 'while' calling PyIter_Next .

But since this seems to have gone so long without being changed I 
would feel better about having someone tell me it is okay to 
change.  I will email python-dev and ask.
History
Date User Action Args
2007-08-23 16:07:08adminlinkissue798046 messages
2007-08-23 16:07:08admincreate