Message385800
In section 4.6 of the tutorial, we find:
"When a function calls another function, a new local symbol table is created for that call."
Now, perhaps because we were just looking at a function that people will often ask you to write both recursively and non-recursively and then ask which one you would use and why...I was thinking "Wait -- when a function calls itself recursively, obviously they need a new local symbol table or local variables won't work??"
I may be confused, in which case the doc is fine and I personally need to better understand the moral equivalent of activation record / stack frame in Python.
If I am not, given that recursion isn't much more computer science oriented or obscure than Fibonacci sequences, could it not be worth the investment of a few extra words as:
"When a function calls another function, or calls itself recursively, a new local symbol table is created for that call." |
|
Date |
User |
Action |
Args |
2021-01-27 18:42:22 | jessevsilverman | set | recipients:
+ jessevsilverman, docs@python |
2021-01-27 18:42:22 | jessevsilverman | set | messageid: <1611772942.43.0.309900316345.issue43042@roundup.psfhosted.org> |
2021-01-27 18:42:22 | jessevsilverman | link | issue43042 messages |
2021-01-27 18:42:22 | jessevsilverman | create | |
|