
Dec. 11, 2019
5:09 p.m.
On Dec 11, 2019, at 03:57, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
On 11/12/19 9:45 pm, Steven D'Aprano wrote:
But that's not what happens if you call `first(iterable)` multiple times. Calling it once is fine, but people will call it multiple times.
Would it help if it were called "one" instead of "first"?
I’d expect one to be “like first, but raise if there are two or more elements”, because that’s what it means in a number of functional languages and database libraries, and more-itertools.