
Dec. 10, 2019
12:06 a.m.
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