~/talk

A Beginner's Guide to Tackling Recursion

Talkat PyOhio 2018 · 2018-07-28..07-29· [python]
slides:none on file

Covers concrete rules and demos: explains the call stack and why recursion causes stack overflow at about 1,000 calls, shows that raising it with sys.setrecursionlimit can crash the interpreter, visualizes frames with Python Tutor, and contrasts recursive vs iterative implementations for factorial and Fibonacci. Builds a working file-search (depth‑first) using os.listdir/os.path and a Sierpinski fractal with turtle. Shows memoization (functools.lru_cache) fixes Fibonacci’s exponential work; tail‑call elimination is unavailable in CPython.

AI-written summary · about

  1. 0:00Intro
  2. 2:25Overview
  3. 3:51Recursion Jokes
  4. 5:23What is recursion
  5. 8:32Stacks
  6. 10:15Python Lists
  7. 12:53Function Calls
  8. 14:52Visualize Execution
  9. 22:45Set Recursion Limit
  10. 26:05Base Case
  11. 29:30Recursion
  12. 42:45Before and After
  13. 45:45Local Variables
  14. 50:45Fibonacci Sequence
  15. 52:45Fibonacci
  16. 57:45Fibonacci Growth Example
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.