Skip to content
Discussion options

You must be logged in to vote

Running this program on a ESP32-C3 shows that the maximum recursion depth is about 25.

def doit(count):
    print(count)
    doit(count + 1)

doit(1)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Traceback (most recent call last):
  File "<stdin>", line 5, in <module>
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
  File "<stdin>", line 3, in doit
…

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by straga
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants