Path: csiph.com!usenet.pasdenom.info!news.redatomik.org!newsfeed.xs4all.nl!newsfeed8.news.xs4all.nl!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.010 X-Spam-Evidence: '*H*': 0.98; '*S*': 0.00; 'received:134': 0.05; 'default.': 0.07; 'wednesday,': 0.07; 'python': 0.10; 'def': 0.13; 'received:ac.be': 0.16; 'saying.': 0.16; 'whatsoever': 0.16; 'wrote:': 0.16; "shouldn't": 0.18; '>>>': 0.20; '2015': 0.20; 'saying': 0.22; 'assign': 0.22; 'pass': 0.22; 'leave': 0.23; 'header:In-Reply-To:1': 0.24; 'header:User-Agent:1': 0.26; 'specify': 0.27; 'tail': 0.29; "i'm": 0.30; 'subject:/': 0.30; '15,': 0.30; 'received:be': 0.30; 'problem': 0.33; 'needed': 0.36; 'to:addr:python-list': 0.36; 'pm,': 0.36; 'subject:: ': 0.37; 'requirement': 0.37; 'why': 0.39; 'to:addr:python.org': 0.40; 'default': 0.61; 'smooth': 0.66; 'batchelder': 0.84; 'utc-4,': 0.84; 'more?': 0.91 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Al8FAEI9plWGuA9G/2dsb2JhbABbhCwkgyTAGQKCDgEBAQEBAYUvAQEEI1URCxgCAgUWCwICCQMCAQIBRRMGAgKIKrkdkSuFBAEBCAIggSKKKoUNFoJSgUMBBJQ9jA6INpBAJmODG22CSwEBAQ Date: Wed, 15 Jul 2015 13:04:32 +0200 From: Antoon Pardon User-Agent: Mozilla/5.0 (X11; Linux i686; rv:31.0) Gecko/20100101 Icedove/31.7.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Possibly Pythonic Tail Call Optimization (TCO/TRE) References: <55A3A853.4040006@rece.vub.ac.be> <55A3C366.6060602@rece.vub.ac.be> <87fv4r1fre.fsf@jester.gateway.sonic.net> <877fq3nuwo.fsf@elektro.pacujo.net> <87380rnrqt.fsf@elektro.pacujo.net> <87615lncmd.fsf@elektro.pacujo.net> <2ab46173-5bfb-44df-b7e5-c92fcd0c9461@googlegroups.com> <87r3o9lmf6.fsf@elektro.pacujo.net> In-Reply-To: <87r3o9lmf6.fsf@elektro.pacujo.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit 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: 23 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1436958274 news.xs4all.nl 2929 [2001:888:2000:d::a6]:45609 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:93864 On 07/15/2015 12:55 PM, Marko Rauhamaa wrote: > Ned Batchelder : > >> On Wednesday, July 15, 2015 at 2:44:55 AM UTC-4, Marko Rauhamaa wrote: >>> The other problem for tail call elimination is the requirement that >>> functions return None by default. Smooth tail call elimination would >>> require that Python leave the default return value unspecified. >> I don't understand this, can you explain more? Are you saying that the >> Python specification shouldn't specify what x becomes?: >> >> def who_knows(): >> pass >> >> x = who_knows() > Yes, that's what I'm saying. The implementation would be free to assign > any value whatsoever to x. And can you explain why this would be needed foor smooth tail call elimination? -- Antoon Pardon.