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 details)
Built Distribution
RecursionTree-1.5-py3.7.egg
(36.2 kB
view details)
File details
Details for the file RecursionTree-1.5.tar.gz
.
File metadata
- Download URL: RecursionTree-1.5.tar.gz
- Upload date:
- Size: 26.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a388a92a42570fdd1d7e362ae57bd0ee546db78af5e477f2b4c67356ab0c0ebe |
|
MD5 | 70fcdcd6dffa96deeb20529a6ee68d24 |
|
BLAKE2b-256 | dd37b33f90a75ff6201f42ced9fc5ea8cf923af44e0e3044952832c6a5ba2e82 |
File details
Details for the file RecursionTree-1.5-py3.7.egg
.
File metadata
- Download URL: RecursionTree-1.5-py3.7.egg
- Upload date:
- Size: 36.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1rc1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 686a6f60ce9a7673d4b102430132738df8f8d4717dedf83a2f27990562f688f5 |
|
MD5 | 0e4afe873461e8f71c578cca8a3493a4 |
|
BLAKE2b-256 | f717df27e9ea8eceac4c29f5076046859d5103290781f0fb1d598ec721d9578b |