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.3.tar.gz
(26.6 kB
view hashes)
Built Distribution
Close
Hashes for RecursionTree-1.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 49b2209972d87178417d37581b19701f44a08266ea57b892b0c21a0017cac96f |
|
MD5 | d31dca2da14e4abc0c1130a9d86c4912 |
|
BLAKE2b-256 | f91c6a45ed2669799e156366efc9ba47bd76d62ddc83432b1d2e5cde30426469 |