Builds recursive calls tree and saves it as a PNG file.
Project description
Recursion tree
Transforms recursive functions in graphical form.
Installation:
pip install RecursionTree
Usage:
@recursion_tree
def fact(x: int) -> int:
return 1 if x <= 1 else x * fact(x-1)
Just add the 'recursion_tree' decorator to any recursive function. After the run, parameters of the call will be saved as recursion_tree.json. Additional settings might be used via settings.py.
Example of use:
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
RecursionTree-1.5.tar.gz
(26.8 kB
view hashes)
Built Distribution
RecursionTree-1.5-py3.7.egg
(36.2 kB
view hashes)