On Dec 10, 2019, at 13:50, Tim Peters <tim.pet...@gmail.com> wrote:
> 
> Talking about "needed" is treating this like an axiomatic system where
> redundancy is in Very Bad Taste.  But, to the contrary, in functional
> languages the _implementers_ think very hard about creating a minimal
> core, but the user interface supplies everything _useful_ and
> sometimes doesn't even note whether a thing is part of the minimal
> core.

There’s a pretty clear internal philosophy to what’s in itertools, and a just 
as clear but very different one for more-itertools. The former is just the 
building blocks that you couldn’t build yourself, and you’re supposed to 
compose them up yourself, with the recipes as a guide; if you really insist on 
out-of-the-box stuff, here’s a link to more-itertools. Meanwhile, 
more-itertools is your lispy philosophy: anything that people are likely to 
want to use as a primitive belongs there, even if it’s dead obvious how to 
compose it up yourself as a one-liner.

I think you’re arguing that the philosophy of itertools is just wrong, at least 
for the kind of code you usually write with it and the kind of people who 
usually write that code. Is that fair, or am I misrepresenting you here?

Meanwhile, I think Guido and some others accept the itertools philosophy but 
argue that first needs to be there because many of the kinds of people who need 
it actually can’t just write it themselves (they don’t know about 2-arg next, 
or they don’t understand the subtleties of leaking StopIteration, or whatever). 
That’s a pretty different argument. (Not that there can’t be something to both 
arguments, of course.)
_______________________________________________
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/3AFRE2GVKOIWTX7KZJGTGER52M45ZWCS/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to