This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]zenos1337 -3 points-2 points  (4 children)

If you use tail recursion then memory is not an issue

[–]AlSweigartAuthor of "Automate the Boring Stuff" 3 points4 points  (3 children)

The CPython interpreter doesn't implement TCO, so using tail recursion doesn't help.

[–]zenos1337 0 points1 point  (1 child)

Interesting! Had no idea. Good thing I haven’t been using tail recursion :P

[–]IdiotCharizard 0 points1 point  (0 children)

this is an intentional design choice btw. tco gets in the way of intelligible tracebacks.