[Tutor] Infinite Recursion
William Becerra
wbecerra1 at gmail.com
Sun Oct 12 09:41:40 CEST 2014
Hey, I'm new to programming.
Using python 2.7.8 and running windows8 OS
I'm reading 'How to think like a computer scientist, learning with Python'
I'm in chapter 4 sub-chapter 4.11 Infinite recursion
According to the book if I write
def recurse():
recurse()
I should get the following error
File"<stdin>", line2, in recurse
( 98 repetitions omittted)
File "<stdin>", line 2, in recurse
RuntimeError: Maximum recursion depth exceeded.
I don't get that error, instead the Python shell prints out two blank lines.
>From what i understand if i don't get the error the infinite recursion is
not
been tried by the shell.
Am I missing anything in the code?
and If anything is wrong. How can I write a easy Infinite recursion to help
me grasp the concept?
Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tutor/attachments/20141012/9a3e739d/attachment.html>
More information about the Tutor
mailing list