Currently the python_ta.debug.RecursionTable context manager only works with a single function_name argument. However, there are cases where we may want to support mutual recursion like
def f(n: int) -> int:
if n <= 0:
return 1
else:
return 2 + g(n - 1)
def g(n: int) -> int:
if n <= 0:
return 1
else:
return 2 * f(n - 1)
Let's modify RecursionTable to take a list of function names to be able to trace. The table output format will likely need to be updated as well.
Currently the
python_ta.debug.RecursionTablecontext manager only works with a singlefunction_nameargument. However, there are cases where we may want to support mutual recursion likeLet's modify
RecursionTableto take a list of function names to be able to trace. The table output format will likely need to be updated as well.