Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!xlned.com!feeder5.xlned.com!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; 'python.': 0.02; 'algorithm': 0.04; 'builtin': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'python': 0.11; 'algorithm.': 0.16; 'corresponds': 0.16; 'guys,': 0.16; 'kern': 0.16; 'naming': 0.16; 'received:80.91.229.3': 0.16; 'received:plane.gmane.org': 0.16; 'similarly,': 0.16; 'underlying': 0.16; 'url:file': 0.16; 'wrote:': 0.18; 'hey': 0.18; 'url:default': 0.19; 'header:User- Agent:1': 0.23; 'interpret': 0.24; 'decide': 0.24; 'source': 0.25; 'header:X-Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'robert': 0.30; 'url:python': 0.33; "didn't": 0.36; 'method': 0.36; 'thanks': 0.36; 'url:org': 0.36; 'convention': 0.38; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'received:org': 0.40; 'first': 0.61; 'email addr:gmail.com': 0.63; 'our': 0.64; 'world': 0.66; 'believe': 0.68; 'eco': 0.84; 'reply!': 0.84; 'terrible': 0.84; 'url:cpython': 0.84; 'received:86': 0.91 X-Injected-Via-Gmane: http://gmane.org/ To: python-list@python.org From: Robert Kern Subject: Re: Timsort in Cpython Date: Sat, 15 Jun 2013 21:55:29 +0100 References: <9ca984d5-19d9-4e82-a305-2a2f5ee341fe@googlegroups.com> <21a6a262-765b-4771-809e-56a9808d9cf9@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Gmane-NNTP-Posting-Host: cpc2-cmbg17-2-0-cust347.5-4.cable.virginmedia.com User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:17.0) Gecko/20130509 Thunderbird/17.0.6 In-Reply-To: <21a6a262-765b-4771-809e-56a9808d9cf9@googlegroups.com> 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: 22 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371329739 news.xs4all.nl 15976 [2001:888:2000:d::a6]:41262 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:48369 On 2013-06-15 21:21, alphonse23@gmail.com wrote: > Hey guys, > Thanks for the quick reply! So why did they decide to call it listsort in the source instead? Why didn't they keep it as Timsort? This was the first implementation of the algorithm. The algorithm was only colloquially named "Timsort" after it was used in Python. This the naming convention for the C implementation of builtin types' methods in the Python codebase. The C implementation listsort() corresponds with the Python method list.sort(). Similarly, listappend() is list.append(), listpop() is list.pop(), etc. C.f. http://hg.python.org/cpython/file/default/Objects/listobject.c#l2362 -- Robert Kern "I have come to believe that the whole world is an enigma, a harmless enigma that is made terrible by our own mad attempt to interpret it as though it had an underlying truth." -- Umberto Eco