Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed4.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.000 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'kind,': 0.05; 'tree': 0.05; '"as': 0.07; 'damages': 0.07; 'granted,': 0.07; 'method.': 0.07; 'implied,': 0.09; 'liability,': 0.09; 'portions': 0.09; 'tort': 0.09; 'trees': 0.09; 'url:github': 0.09; 'cc:addr:python- list': 0.11; 'bug': 0.12; 'apache': 0.15; '__del__': 0.16; 'bsd': 0.16; 'bug,': 0.16; 'cc:name:python list': 0.16; 'charge,': 0.16; 'claim,': 0.16; 'dealings': 0.16; 'deletion': 0.16; 'deletions': 0.16; 'element.': 0.16; 'merge,': 0.16; 'modify,': 0.16; 'publish,': 0.16; 'restriction,': 0.16; 'sublicense,': 0.16; 'url:py': 0.16; 'eager': 0.16; 'wrote:': 0.18; 'bit': 0.19; 'properly': 0.19; 'warranties': 0.19; 'later': 0.20; '(the': 0.22; 'code,': 0.22; 'issue.': 0.22; 'otherwise,': 0.22; 'cc:addr:python.org': 0.22; 'exists': 0.24; 'mon,': 0.24; 'software.': 0.24; 'cc:2**0': 0.24; 'sort': 0.25; 'permission': 0.26; 'recognized': 0.26; 'header:In-Reply-To:1': 0.27; 'appear': 0.29; '(c)': 0.29; "doesn't": 0.30; 'contract,': 0.30; 'liable': 0.30; 'message-id:@mail.gmail.com': 0.30; "i'm": 0.30; 'included': 0.31; 'code': 0.31; 'software,': 0.31; 'usually': 0.31; '"do': 0.31; 'conditions:': 0.31; 'holders': 0.31; 'node': 0.31; 'subject:skip:i 10': 0.31; 'this.': 0.32; 'probably': 0.32; 'thanks!': 0.32; 'text': 0.33; 'whom': 0.33; 'limitation': 0.33; "i'd": 0.34; 'could': 0.34; 'problem': 0.35; 'received:209.85': 0.35; 'connection': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'doing': 0.36; "didn't": 0.36; "i'll": 0.36; 'possible': 0.36; 'subject:?': 0.36; 'similar': 0.36; 'url:eu': 0.37; 'so,': 0.37; 'received:209': 0.37; 'starting': 0.37; 'files': 0.38; 'pm,': 0.38; 'skip:& 20': 0.39; 'changed': 0.39; 'deleting': 0.60; 'free': 0.61; 'black': 0.61; 'introduced': 0.61; "you've": 0.63; 'skip:n 10': 0.64; 'become': 0.64; 'more': 0.64; 'love': 0.65; 'account': 0.65; 'smith': 0.68; 'subject': 0.69; 'bank': 0.76; '"do': 0.84; 'subject:Red': 0.84; 'url:master': 0.84; 'to:none': 0.92; 'tomorrow': 0.95; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:cc:content-type; bh=3difXJ08wNUAOI24RSaXHKPyO/R3tgdRgO6h+P3cvaQ=; b=yG1scWqGYOu/1H8JmMcOQ+8Gv2Lj5ZBFmH2fNcCRIvsStj/5bjoqpKC4MHkRe38che l0lu2pemHRr+EkEJO3CFojJ9LwQO73AMxV8+1ldDrEoUYrG4VHTYqjOOUpVyRsw1uZ3X 6ZINqYy3y3vVPY74jJhhKPWT3PAc1+EFlL974XSUa1mEwGgkLxey4SOSSSWvQOTdYq0c RQT5G8Fz2sqv/0QawsomOAfHLyVonUhtgcKzYX630EwV7ybREFd4noA0GXXd3fHjEEEb fcayeENIswNtnTVXPFTdxZ5Nrx9IuDrVC7ByjVzu+vvb73l9Q2sgSG1JPwEgV22Yndwx umog== MIME-Version: 1.0 X-Received: by 10.224.73.73 with SMTP id p9mr261411qaj.19.1367889608697; Mon, 06 May 2013 18:20:08 -0700 (PDT) In-Reply-To: <518850f8$0$8157$862e30e2@ngroups.net> References: <5181ca0e$0$13974$862e30e2@ngroups.net> <518850f8$0$8157$862e30e2@ngroups.net> Date: Mon, 6 May 2013 18:20:08 -0700 Subject: Re: Red Black Tree implementation? From: Dan Stromberg Cc: Python List Content-Type: multipart/alternative; boundary=20cf3074d9ac37f91b04dc169edb 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: 138 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1367889616 news.xs4all.nl 15865 [2001:888:2000:d::a6]:32878 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:44870 --20cf3074d9ac37f91b04dc169edb Content-Type: text/plain; charset=ISO-8859-1 On Mon, May 6, 2013 at 5:55 PM, duncan smith wrote: > > What license? >> >> Thanks! >> >> > Here's the text I usually prepend. > > > ##Copyright (c) 2013 duncan g. smith > ## > ##Permission is hereby granted, free of charge, to any person obtaining a > ##copy of this software and associated documentation files (the > "Software"), > ##to deal in the Software without restriction, including without limitation > ##the rights to use, copy, modify, merge, publish, distribute, sublicense, > ##and/or sell copies of the Software, and to permit persons to whom the > ##Software is furnished to do so, subject to the following conditions: > ## > ##The above copyright notice and this permission notice shall be included > ##in all copies or substantial portions of the Software. > ## > ##THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS > ##OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF > MERCHANTABILITY, > ##FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL > ##THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR > ##OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, > ##ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR > ##OTHER DEALINGS IN THE SOFTWARE. > > > Basically, "do what you want with it but don't blame me if it goes tits > up". I'm happy to consider tidying it up a bit and using a more recognized > form of licence. Just had a bank holiday here, so bug not yet squashed. But > it is the sort of bug that might account for what you've seen (if a similar > bug exists in the code you've been using). The tree doesn't always get > properly rebalanced on node removals. I'll attack the problem later > tomorrow (technically, later today). Cheers. > I'd prefer Apache or MIT or BSD 3-clause, but I could probably work with this. http://joinup.ec.europa.eu/community/eupl/news/licence-proliferation-way-out I'm eager to see the code, and would love it if you sorted out the deletion rebalance issue. I just plunked some time into https://github.com/headius/redblack/blob/master/red_black_tree.py , only to find that it didn't appear to be doing deletions correctly - the tree would become unprintable after deleting one element. It's possible I introduced the bug, but right now I don't particularly suspect so, having not changed the __del__ method. I'm starting to think Red Black Trees are pretty complex. --20cf3074d9ac37f91b04dc169edb Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable

= On Mon, May 6, 2013 at 5:55 PM, duncan smith <buzzard@invalid.inval= id> wrote:

What license?

Thanks!


Here's the text I usually prepend.


##Copyright (c) 2013 duncan g. smith
##
##Permission is hereby granted, free of charge, to any person obtaining a ##copy of this software and associated documentation files (the "Softw= are"),
##to deal in the Software without restriction, including without limitation=
##the rights to use, copy, modify, merge, publish, distribute, sublicense,<= br> ##and/or sell copies of the Software, and to permit persons to whom the
##Software is furnished to do so, subject to the following conditions:
##
##The above copyright notice and this permission notice shall be included ##in all copies or substantial portions of the Software.
##
##THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,= EXPRESS
##OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILIT= Y,
##FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL ##THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
##OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
##ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
##OTHER DEALINGS IN THE SOFTWARE.


Basically, "do what you want with it but don't blame me if it goes= tits up". I'm happy to consider tidying it up a bit and using a m= ore recognized form of licence. Just had a bank holiday here, so bug not ye= t squashed. But it is the sort of bug that might account for what you'v= e seen (if a similar bug exists in the code you've been using). The tre= e doesn't always get properly rebalanced on node removals. I'll att= ack the problem later tomorrow (technically, later today). Cheers.

I'd prefer Apache or MIT= or BSD 3-clause, but I could probably work with this.=A0 htt= p://joinup.ec.europa.eu/community/eupl/news/licence-proliferation-way-out


--20cf3074d9ac37f91b04dc169edb--