On Mon, Dec 09, 2019 at 01:44:15AM +0000, MRAB wrote:

> >     values = take(count, items, default=None)
[...]

> Why is the count first? Why not have the (definitely required) items 
> first and let the count have a default of 1?

I lifted the bulk of the function, including the signature, from the 
recipe in the itertools documentation.

I suspect the reason the recipe specifies the count first is because 
that follows the standard order in English:

"take two of the eggs"

rather than "take eggs two of".


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

Reply via email to