Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder4.news.weretis.net!ecngs!feeder2.ecngs.de!81.171.88.16.MISMATCH!hq-usenetpeers.eweka.nl!hq-usenetpeers.eweka.nl!bcyclone04.am1.xlned.com!bcyclone04.am1.xlned.com!newsfeed.xs4all.nl!newsfeed2a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'cpython': 0.05; 'tree': 0.05; 'pypi': 0.07; 'dan': 0.09; 'lawrence': 0.09; 'library?': 0.09; 'trees': 0.09; 'runs': 0.10; 'cc:addr:python-list': 0.11; 'python': 0.11; 'jan': 0.12; 'mostly': 0.14; 'attempted': 0.16; 'cc:name:python list': 0.16; 'tempted': 0.16; 'wrote:': 0.18; 'implementing': 0.19; '>>>': 0.22; 'cc:addr:python.org': 0.22; "aren't": 0.24; 'mon,': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; "i've": 0.25; 'header:In-Reply-To:1': 0.27; 'message- id:@mail.gmail.com': 0.30; 'page.': 0.31; 'probably': 0.32; 'at:': 0.34; 'maybe': 0.34; 'common': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; "didn't": 0.36; 'url:org': 0.36; 'problems': 0.38; 'focused': 0.38; 'version,': 0.38; 'pm,': 0.38; 'most': 0.60; "you're": 0.61; 'times': 0.62; "you've": 0.63; 'kind': 0.63; 'specialized': 0.65; 'interest.': 0.81; '2015': 0.84; 'to:addr:yahoo.co.uk': 0.84; 'url:ru': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=oL6+5d1CmgcCcZ9UOAkZyhfv6Sot+x89istADKTe0lk=; b=TkJ6dXh9S1LUOoCMAZh2i3ngGHG5Ct1cV4ylfWDp2c20fzgowcpUhUMY19Ga4xznvt i8YrXkgU6yheG73ewCNQruv1X70bWqDUsticBw71HCc+iO49ATMJ3cmR6t22+o/8b9B9 mOWLBSNY1kQMrJJ1P1sOm/ZbjRzsTqwlWVt5XaGx5yTGhD66LpRIPQldBMUKO+qdUY1r EpmZ415af0Qc6Xv9sy6uV/Tvm/AP1UWGVrb6Vq1x4XFrqIKjLvqaOITQlaA17m0JJgd8 xGykEl7bZGwREFIL8hlvmUvq+crVchWnTdIlB4Bv5dRw6tfOkqJ0a+YuLnBhyNKVMOEl Mf4w== MIME-Version: 1.0 X-Received: by 10.112.150.194 with SMTP id uk2mr36045959lbb.84.1421727712960; Mon, 19 Jan 2015 20:21:52 -0800 (PST) In-Reply-To: References: Date: Mon, 19 Jan 2015 20:21:52 -0800 Subject: Re: Trees From: Dan Stromberg To: Mark Lawrence Content-Type: text/plain; charset=UTF-8 Cc: Python List 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: 34 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1421727721 news.xs4all.nl 2838 [2001:888:2000:d::a6]:33917 X-Complaints-To: abuse@xs4all.nl X-Received-Body-CRC: 545472915 X-Received-Bytes: 4588 Xref: csiph.com comp.lang.python:84057 On Mon, Jan 19, 2015 at 6:46 PM, Mark Lawrence wrote: > On 20/01/2015 00:49, Dan Stromberg wrote: >> >> On Mon, Jan 19, 2015 at 2:06 PM, Zachary Gilmartin >> wrote: >>> >>> Why aren't there trees in the python standard library? >> >> >> Trees are kind of specialized datastructures; no one type of tree >> solves all tree-related problems suitably well. >> >> I think probably the most common need for a tree is implementing a >> cache, but most times you're tempted to sort inside a loop you're >> better off with a tree. >> >> I've put some time into python trees; most of them are on pypi and at: >> http://stromberg.dnsalias.org/~dstromberg/datastructures/ >> and: >> http://stromberg.dnsalias.org/~strombrg/python-tree-and-heap-comparison/ >> >> HTH >> > > I don't know if you've seen this http://kmike.ru/python-data-structures/ but > maybe of interest. I've seen it. It's a nice page. I attempted to get my treap port in there since it has a Cython version, but it didn't seem to take. I've mostly focused on pure python that runs on CPython 2.x, CPython 3.x, Pypy, Pypy3 and Jython.