On Dec 8, 2019, at 20:59, Guido van Rossum <gu...@python.org> wrote:
> 
> But even if you know about 2-arg next(), the next(iter(it), default) version 
> is not quite trivial to come up with -- you have to remember to put the 
> iter() call in -- but IMO the main problem is that not enough people know 
> about 2-arg next(), and that makes it pass the second bar.

Are people who never find 2-arg next going to find itertools.first?

I think most people who use itertools regularly enough to look there are people 
who already know 2-arg next (and also, mostly people who are “thinking 
functionally”, for that matter). Other people will discover it if someone 
points them there on -list or on StackOverflow or as student help or whatever, 
but they can already discover 2-arg next the same ways. In fact, what they’re 
probably going to find on StackOverflow is an answer all about 2-arg next, with 
a little edited-in footnote or comment saying “if you’re using the upcoming 
3.9, you can use first instead of next and leave out the call to iter”.
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/Z2BRQHLBWXF2GL25JG7SL56UORFENIHI/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to