Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.002 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'api.': 0.05; 'say,': 0.05; 'subject:Python': 0.06; 'method.': 0.07; 'calls.': 0.09; 'lawrence': 0.09; 'python': 0.11; 'creates': 0.14; 'aesthetic': 0.16; 'from:addr:timgolden.me.uk': 0.16; 'from:name:tim golden': 0.16; 'itertools': 0.16; 'mark,': 0.16; 'message- id:@timgolden.me.uk': 0.16; 'pypi?': 0.16; 'received:74.55.86': 0.16; 'received:74.55.86.74': 0.16; 'received:smtp.webfaction.com': 0.16; 'received:webfaction.com': 0.16; 'recipe': 0.16; 'recipes': 0.16; 'release:': 0.16; 'roy': 0.16; 'tjg': 0.16; 'wrote:': 0.18; 'module': 0.19; 'later': 0.20; 'header:User-Agent:1': 0.23; 'received:192.168.100': 0.24; 'initial': 0.24; 'developers': 0.25; 'header:In-Reply-To:1': 0.27; "doesn't": 0.30; 'raymond': 0.30; 'documenting': 0.31; 'class': 0.32; 'subject:the': 0.34; 'something': 0.35; 'no,': 0.35; 'but': 0.35; 'should': 0.36; 'effort': 0.37; 'step': 0.37; 'sometimes': 0.38; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'enough': 0.39; 'gone': 0.61; 'new': 0.61; 'balance': 0.61; 'matter': 0.61; 'times': 0.62; 'more': 0.64; 'worth': 0.66; 'frequently': 0.68; 'smith': 0.68; 'useful.': 0.68; 'from:addr:mail': 0.83; 'conceived': 0.84; 'cut-off': 0.84; 'prefers': 0.84 Date: Thu, 09 Jan 2014 16:41:16 +0000 From: Tim Golden User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: the Gravity of Python 2 References: <52CE3416.9090501@stoneleaf.us> <7wiottej72.fsf@benfinney.id.au> <82fa7f62-9625-41cc-8d1f-c87c0e51cb47@googlegroups.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 27 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1389285687 news.xs4all.nl 2866 [2001:888:2000:d::a6]:40773 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:63613 On 09/01/2014 16:30, Mark Lawrence wrote: > On 09/01/2014 16:21, Roy Smith wrote: >> >> No, it would be solved by a built-in method. Recipes are a cop-out. >> If something is complicated enough to require a recipe, and used >> frequently enough to be worth writing that recipe up and documenting >> it, you might as well have gone the one additional step and made it a >> method. >> > > So all of the itertools recipes should be part of the Python module and > not in more-itertools on pypi? To be fair, Mark, it's a matter of taste. Raymond [the author/maintainer of itertools] prefers not to multiply the API; other developers might legitimately make other calls. Sometimes the cut-off is more obvious; say, when the effort to make a recipe general purpose creates an over-engineered API. Other times it's just preference. Does that mean that every recipe ever conceived should be stuffed into the class or module it uses? No; but it doesn't rule out adding things which are genuinely useful. I think the new statistics module has hit a nice balance on its initial release: it's a stripped down aesthetic without precluding later additions. TJG