Linux/Unix > Python Essential Reference, Second Edition > 6. Functions and Functional Programming > Recursion | See All Titles

< BACK | Make Note | Bookmark | CONTINUE >

155117184014003188065099048180054212144238241179195140058238110137104017178095199240087250

### Recursion

Python places a limit on the depth of recursive function calls. The function `sys.getrecursionlimit()` returns the current maximum recursion depth and the function `sys.setrecursionlimit()` can be used to change the value. The default value is `1000`. When the recursion depth is exceeded, a `RuntimeError` exception is raised.

| Last updated on 3/28/2002 Python Essential Reference, Second Edition, © 2002 New Riders Publishing

< BACK | Make Note | Bookmark | CONTINUE >

© 2002, O'Reilly & Associates, Inc.