Skip to main content

detect recursion

Project description

Installation

$ [sudo] pip install recursion-detect

Functions

function __doc__
recursion_detect.depth() return recursion depth. 0 if no recursion

Examples

>>> import recursion_detect
>>> def recur():
    depth = recursion_detect.depth()
    print("depth = %s" % depth)
    if depth==5:
        return
    recur()

>>> recur()
0
1
2
3
4

readme-generator

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

recursion-detect-2019.3.22.tar.gz (1.4 kB view hashes)

Uploaded Source

Built Distribution

recursion_detect-2019.3.22-py2.py3-none-any.whl (147.4 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page