Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.033 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'algorithm': 0.04; 'cc:addr :python-list': 0.11; 'url:file': 0.16; 'sat,': 0.16; 'sender:addr:gmail.com': 0.17; 'thanks,': 0.17; 'wrote:': 0.18; 'trying': 0.19; "python's": 0.19; 'url:default': 0.19; 'help.': 0.21; 'cc:addr:python.org': 0.22; 'looks': 0.24; 'cc:2**0': 0.24; 'cc:no real name:2**0': 0.24; '15,': 0.26; 'somewhere': 0.26; 'header:In-Reply-To:1': 0.27; 'point': 0.28; 'function': 0.29; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'anyone': 0.31; 'url:python': 0.33; 'sense': 0.34; 'there,': 0.34; 'could': 0.34; 'but': 0.35; 'received:google.com': 0.35; 'located': 0.36; 'url:org': 0.36; 'somebody': 0.38; 'pm,': 0.38; 'here:': 0.62; 'to:addr:gmail.com': 0.65; 'url:c': 0.67; 'actually,': 0.84; 'url:cpython': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=faQc7RWztvhdbU2SQv3Y/NgGqaq5kO2Rzv0u5lNe1TA=; b=Rhhjrjf/zdS9VXU+mjpOzds2LLBTtmIJmqN7qvsFXNZPBwALaRmf15ZdzQLdETzny9 p1W8vrnzB2hYljbeG1lwfwMlFVT/qKrtM4Bxu1zZGYgX+9agBTZpnHVZRejpB4qKW38q C+zbGpTMl/c9Pv8OcDAZjE3m6vU/yfWq/EgUTky9PSbTc1sjZwZ/Jv6G15FxmxcYIZpr OcH9FDbELQGt17YPuBKWfz2zorbQRn3QA9l7H5Yv4qkoHkVHBL/xw+fhvPqz8LNpVP4D nncMx0hn3QSlWrGfrOLq94pRr4zw+XUt8Nae047cIXs1QMoCEJA9T/eZLARv/j2vD65+ 7z3w== X-Received: by 10.204.230.71 with SMTP id jl7mr1089709bkb.72.1371326139459; Sat, 15 Jun 2013 12:55:39 -0700 (PDT) MIME-Version: 1.0 Sender: zachary.ware@gmail.com In-Reply-To: <9ca984d5-19d9-4e82-a305-2a2f5ee341fe@googlegroups.com> References: <9ca984d5-19d9-4e82-a305-2a2f5ee341fe@googlegroups.com> From: Zachary Ware Date: Sat, 15 Jun 2013 14:55:18 -0500 X-Google-Sender-Auth: Mo98KrFbiSTYj9-rz_G4LX_FF8w Subject: Re: Timsort in Cpython To: alphonse23@gmail.com Content-Type: text/plain; charset=UTF-8 Cc: python-list@python.org 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: 15 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1371326146 news.xs4all.nl 15977 [2001:888:2000:d::a6]:47208 X-Complaints-To: abuse@xs4all.nl Path: csiph.com!usenet.pasdenom.info!news.stben.net!border3.nntp.ams.giganews.com!border1.nntp.ams.giganews.com!nntp.giganews.com!usenetcore.com!newsfeed.xs4all.nl!newsfeed2.news.xs4all.nl!xs4all!news2.euro.net!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Xref: csiph.com comp.lang.python:48359 On Sat, Jun 15, 2013 at 2:44 PM, wrote: > I'm currently trying to make sense of Python's Timsort function. From the wikipedia page I was told the algorithm is located somewhere here: http://hg.python.org/cpython/file/default/Objects/listobject.c > > So of all the functions in there, could somebody point to me which one is timsort? > > Thanks, if anyone can help. > Alphonse23 Actually, it looks to me like it's several of them, but the main function is here: http://hg.python.org/cpython/file/default/Objects/listobject.c#l1902. HTH, Zach