Terry J. Reedy <tjre...@udel.edu> added the comment:

I currently agree with Serhiy and am not persuaded that either new function is 
needed.

1. findalliter: For 3.0, I might have been more aggressive than we were in 
turning list-returning functions into iterators, as done with map, etc.  But 
the collective decision, led by Guido, was that for some, such as str.split, 
the efficiency gain was not worth the disruption.  The thought was that 
returned lists were typically 'small';  they are definitely finite (whereas 
map(func, infinite_iterator) is itself an infinite iterator).  It is too late 
to reverse that decision, and I would be wary of adding iterator versions.  
There is no particular justification for this one.

2. findfirst: This seems to be a near duplicate of search.  

I don't know why people use findall(...)[0] instead of search (which I learned 
first), but I don't see 'lack of symmetry and completeness' as a reason. 
'python-ideas' is a mailing list, not a person or even a defined group of 
people.  The respondents on any thread tend to be a biased selection of the 
community.  Such discussions suggest but do not determine.

----------
nosy: +terry.reedy

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39165>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to