Python Forum
Recursion in Python Production Code - Printable Version

+- Python Forum (https://python-forum.io)
+-- Forum: General (https://python-forum.io/forum-1.html)
+--- Forum: News and Discussions (https://python-forum.io/forum-31.html)
+--- Thread: Recursion in Python Production Code (/thread-28979.html)



Recursion in Python Production Code - robin73 - Aug-12-2020

I want to get a picture of whether/when recursion is used in Python code "in the wild." Attempts to gather information on this on Stack Exchange have been met with surprising resistance. I'm hoping people here may be more forthcoming.

The phrase "real-world" examples is ambiguous so I left it out of the title. I want to know to what extent recursion is part of the daily toolkit of professional Python developers. Obviously this depends on context, but I want to get sense of the territory. I'm not interested in how it is used implicitly by libraries and in other "under the hood" ways. Instead I want to hear things like:

f"Today I wrote a program which explicitly used recursion to handle {details of computational task} in order to {business goal which my program aims to further}."

Thanks for any insight you can provide.


RE: Recursion in Python Production Code - Larz60+ - Aug-12-2020

This may be helpful: https://www.python-course.eu/recursive_functions.php