On Wed, Dec 11, 2019 at 5:14 PM Steven D'Aprano <st...@pearwood.info> wrote:
>
> On Tue, Dec 10, 2019 at 07:21:13PM -0600, Tim Peters wrote:
> > While the meaning of `first()` is clear for any iterable argument.
>
> Sorry Tim, I have to disagree. The meaning of `first` is:
>
>     return the first element of a sequence or container (in standard
>     iteration order), OR the *next* element of an iterator
>
> and I don't think that this is even a little bit clear from the name.
>

You know that cliche about how today is the first day of the rest of
your life? Your life is an iterator. "Next" and "first" are basically
synonymous when you can't go backwards. IMO the distinction you
describe here isn't actually significant at all - either way, you get
the first element of "whatever remains", and the only difference is
whether it's nondestructive (with most containers) or destructive
(iterators).

ChrisA
_______________________________________________
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/HUTFLCA3ENARCXA2RUDZMICXFKBTIMSV/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to