Path: csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed7.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.001 X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; 'classes,': 0.05; 'method.': 0.05; 'calls.': 0.07; 'type,': 0.07; 'cc:addr:python- list': 0.09; 'concern:': 0.09; 'lookup': 0.09; 'overridden': 0.09; 'subclass': 0.09; 'subject:module': 0.09; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'reedy': 0.16; 'wrote:': 0.16; 'tree': 0.18; '2015': 0.20; 'cc:2**0': 0.20; 'cc:addr:python.org': 0.20; 'pass': 0.22; 'am,': 0.23; 'replacing': 0.23; 'sat,': 0.23; 'header:In-Reply-To:1': 0.24; 'separate': 0.27; 'message-id:@mail.gmail.com': 0.27; 'node': 0.29; 'separated': 0.29; 'instances': 0.33; 'received:google.com': 0.35; 'could': 0.35; 'possible': 0.36; 'subject:: ': 0.37; 'subject:-': 0.39; 'skip:n 10': 0.62; 'more': 0.63; 'jul': 0.72; 'chrisa': 0.84; 'absolutely': 0.88; 'to:none': 0.91; 'serious': 0.97 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:cc :content-type; bh=LwI5r0cV0H2I4c9FDQpjqfbrzTncMGtKLF8Y+KEKhoQ=; b=MeFAmKSd3KRR7Z8RRr9YAIZULDrkum46NCydvLWDBtiEFrrhy04c8WAfcPDHuzbruh q4DcTBL2NeZ4iAwpbLvzfKVxXTghWcU30w+vgOUw6G4RQWBiPnURqtFEjTVfvaSduIyE ZKqgdO2EnpLuPnzAGIDzkNuYkXXiDT8Eh+L8s1BgdU8XzQbfw1zQbMA80kn8xu77lavN xVSh8kVx7I0x53rZxC/n2NOT5TyfYgFEbk+gD2BY1qf50g0YdmQG0zJsXzQTTT9G/q9z bag5D1JqhaXpcSsfT7UdW+BquDzAmxRrcPIxG1rPPHsmbJfjKI+HIDVgKNVhOdPU+gzx AbGQ== MIME-Version: 1.0 X-Received: by 10.50.142.67 with SMTP id ru3mr282581igb.16.1437180451097; Fri, 17 Jul 2015 17:47:31 -0700 (PDT) In-Reply-To: References: <55a3dcd9$0$3024$426a34cc@news.free.fr> <55A6280C.3090602@rece.vub.ac.be> <55A76116.7070708@rece.vub.ac.be> <87lhefanui.fsf@elektro.pacujo.net> <877fpya4hy.fsf@elektro.pacujo.net> Date: Sat, 18 Jul 2015 10:47:30 +1000 Subject: Re: A new module for performing tail-call elimination From: Chris Angelico Cc: "python-list@python.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ 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: 12 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1437180453 news.xs4all.nl 2853 [2001:888:2000:d::a6]:43894 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:94044 On Sat, Jul 18, 2015 at 10:40 AM, Terry Reedy wrote: > If children are not always instances of type(self), as when a tree has > separate Node and Leaf classes, then recursive calls to Node instances must > be separated from non-recursive Leaf calls before replacing the recursive > calls. More serious concern: If it's possible for one of the children to be an arbitrary subclass of that type, it could have overridden the setvalue method. To maintain the expectations, you absolutely have to do the full lookup and pass the message down the chain. ChrisA