Python Forum

Full Version: Recursion in Python Production Code
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
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.