Path: csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!news.albasani.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Peter Otten <__peter__@web.de> Newsgroups: comp.lang.python Subject: Re: Fibonacci series recursion error Followup-To: comp.lang.python Date: Sat, 30 Apr 2011 08:32:55 +0200 Organization: None Lines: 15 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="ISO-8859-1" Content-Transfer-Encoding: 7Bit X-Trace: solani.org 1304145171 22853 eJwFwQEBACAIA7BKCP+xjqD0j+DG0FInRIHDyehdsmwQldXPN8YYfT3uaQdq6Zr0nqEOPxmwER8= (30 Apr 2011 06:32:51 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Sat, 30 Apr 2011 06:32:51 +0000 (UTC) X-User-ID: eJwFwQkBwDAIA0BLPAmscigU/xJ2Rw+NTgQDXO5cT3u2ImrxJVAz6erWheIrzMFzrRLtvAcgdlyy9iWn5QdHvBV1 Cancel-Lock: sha1:CBvaRDW02j7vawKSbiemjITtHp0= X-NNTP-Posting-Host: eJwNxkkBwDAIBEBLG+7IgQD+JbTzGmU79lxMTXR1J+T88aZMwB/Xgrr4PquNAeFuDW12k5vAkqAsLN3gyxKnYx/FzOgi5APZJBnn Xref: x330-a1.tempe.blueboxinc.net comp.lang.python:4352 harrismh777 wrote: > Ian Kelly wrote: >> since the fact is that if >> the function were properly coded, the call stack for fib(20) would >> never be more than 20 entries deep at any one time. >> > > Not so much... and much more !.... > > > ... because each recursion level 'return' calls fib() twice, and each > of those calls fib() twice, and you get the point... I don't understand what you are trying to say -- but it's wrong ;)