[Python-ideas] itertools recipes: why not add them to the stdlib *somewhere*?

Steven D'Aprano steve at pearwood.info
Mon Jul 9 13:32:59 CEST 2012


Nick Coghlan wrote:

> It's very easy to hit a point of diminishing returns where the number
> of possible alternatives mean that attempting to create an abstraction
> layer ends up creating a UI that is *more complicated* than just
> writing your own utility function that does exactly what you want.
[...]

+1 on everything Nick says here.

One additional comment:

> However, sometimes, the correct answer to "Hey, this is a really
> common pattern" is not "We should provide an API that uses that
> pattern internally" but "we should document this pattern, so people
> know it's a common idiom and can tailor it to their specific use case
> and preferences".

Well, maybe, but documenting software patterns are not necessarily "our" job 
(whoever "our" is -- the Python devs, or python.org, or the PSI, or whoever 
people think is responsible).

Python has not been a one-man project for many, many years. There is a rich 
Python ecosystem now, not just Guido or the Python devs, but StackOverflow, 
comp.lang.python, dozens of books, more bloggers than you can poke a stick at, 
#python, etc etc etc. It's not "our" responsibility to teach every Python 
programmer every conceivable pattern. At some point we can just draw a line 
and say "Yeah, that's a useful pattern, but we're not going to document it. 
Somebody else can do it."

Even if that line is somewhat arbitrary.



-- 
Steven



More information about the Python-ideas mailing list