i have a function that calls itself recursively. i want to make it be a generator. how would that complicate things?
You just have to
yield from
the same function/generator. Or just yield if there are some conditions to be taken into consideration.
def my_gen(args):
# some actions
yield from my_gen(args)