Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.dougwise.org!aioe.org!feeder.news-service.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.84.MISMATCH!newsfeed.xs4all.nl!newsfeed5.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.005 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'pypi': 0.04; 'wed,': 0.04; '2.7': 0.05; 'chunk': 0.07; 'received:mail-qy0-f174.google.com': 0.07; "shouldn't": 0.07; 'python': 0.07; 'imported.': 0.09; 'pieces': 0.09; 'subject:method': 0.09; 'api': 0.11; 'pm,': 0.11; 'wrote:': 0.14; 'library': 0.15; 'cmp': 0.16; 'extensions,': 0.16; 'received:209.85.216.174': 0.16; 'subject:sort': 0.16; 'code.': 0.18; 'cc:no real name:2**0': 0.20; 'cc:2**0': 0.20; 'code': 0.22; 'header:In-Reply-To:1': 0.22; 'cc:addr:python-list': 0.22; '"not': 0.23; 'wonder': 0.24; 'guess': 0.26; '(in': 0.27; 'function': 0.27; 'message-id:@mail.gmail.com': 0.28; 'string': 0.29; 'certainly': 0.29; 'push': 0.29; "python's": 0.29; 'sort': 0.30; 'least': 0.30; 'implement': 0.30; 'cc:addr:python.org': 0.31; 'survive': 0.31; 'anyone': 0.31; 'pure': 0.33; 'community': 0.33; 'test': 0.33; 'using': 0.34; 'actually': 0.34; 'race,': 0.35; 'test.': 0.35; 'feature': 0.36; 'data': 0.37; 'received:209.85': 0.37; 'useful': 0.37; 'steven': 0.38; 'received:google.com': 0.38; 'but': 0.38; 'pretty': 0.38; 'sign': 0.38; 'not,': 0.39; 'set': 0.39; 'likely': 0.39; 'could': 0.39; 'received:209': 0.39; 'how': 0.39; 'solution': 0.40; 'would': 0.40; "it's": 0.40; 'header:Received:5': 0.40; 'fact,': 0.60; '2011': 0.62; 'took': 0.64; 'mar': 0.64; 'overall': 0.64; 'interest': 0.65; 'grab': 0.65; 'download.': 0.68; 'alternative': 0.69; 'offer': 0.72; '30,': 0.80; 'lose': 0.84; 'horse': 0.84; 'practical,': 0.84; 'subject:removal': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=Qe/2l4B54G9DtkjvmKaUI9kRCTBbt/1RHYRN8ug28vc=; b=lBiNoM6QWT83H4YEtTL0QHqDh7KPg4I//7nX0uBpvqYb3Ycij66u02FPngp6FH/dXv as8gzhzEiy614fkjR+xytfmZMLDr3cRQcGgKgtMFBXKbr/G37a48Lvl2zCB7UcTgNhL1 BfHV+F+vVNikuAQfUUys2Ijfstw6cifWyQUd8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=SEYaUvB3lGBw5RJvGXm53r5KQT9AJfQsyj9aopjLxvrW6GwoChlSLfRgnH7+n7Vfb2 DSp4EdkpjTfXJqn4Q5Sr0z4rLDvZsZ4d8LxguFrB5ENA5iW2LhHfpJHAex9M4hBp7seo 2iUGMR7u5TbqBUwSl5TSW84CpwbQEKLg8cDgQ= MIME-Version: 1.0 In-Reply-To: <4d93e360$0$29996$c3e8da3$5496439d@news.astraweb.com> References: <4d8bd8a1$0$29977$c3e8da3$5496439d@news.astraweb.com> <4d8d1203$0$29977$c3e8da3$5496439d@news.astraweb.com> <4d90ac87$0$30000$c3e8da3$5496439d@news.astraweb.com> <20110329084657.GE26597@trout.vub.ac.be> <4d93e360$0$29996$c3e8da3$5496439d@news.astraweb.com> Date: Fri, 1 Apr 2011 14:31:09 -0700 Subject: Re: Guido rethinking removal of cmp from sort method From: geremy condra To: "Steven D'Aprano" Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.12 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: 29 NNTP-Posting-Host: 82.94.164.166 X-Trace: 1301693472 news.xs4all.nl 41117 [::ffff:82.94.164.166]:56538 X-Complaints-To: abuse@xs4all.nl Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:2408 On Wed, Mar 30, 2011 at 7:13 PM, Steven D'Aprano wrote: > Or, an alternative approach would be for one of the cmp-supporters to > take the code for Python's sort routine, and implement your own sort-with- > cmp (in C, of course, a pure Python solution will likely be unusable) and > offer it as a download. For anyone who knows how to do C extensions, this > shouldn't be hard: just grab the code in Python 2.7 and make it a stand- > alone function that can be imported. > > If you get lots of community interest in this, that is a good sign that > the solution is useful and practical, and then you can push to have it > included in the standard library or even as a built-in. > > And if not, well, at least you will be able to continue using cmp in your > own code. I don't have a horse in this race, but I do wonder how much of Python could actually survive this test. My first (uneducated) guess is "not very much"- we would almost certainly lose large pieces of the string API and other builtins, and I have no doubt at all that a really significant chunk of the standard library would vanish as well. In fact, looking at the data I took from PyPI a while back, it's pretty clear that Python's feature set would look very different overall if we applied this test to everything. Geremy Condra