Skip to main content

Various utility for handling loops, recursions, etc.

Project description

enveloop

PyPI version Build Status GitHub GitHub last commit

Various utilities for handling loops, recursions, etc.

Limit number of recursions

Let's say you wrote a recursive function and you want to limit number of recursions, just to be infinite loop free, or for any other reason.

from enveloop import limit_recursion_to


# let's limit the number of recursion and after 
# the 10th recursion run a callback function
@limit_recursion_to(number_of_loops=10,
                    callback=lambda arg: ...)
def my_func(arg):
    ...
    my_func(arg)
    ...

Changelog

0.1.0

Added:

  • limit_recursion_to()

Project details


Release history Release notifications

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
enveloop-0.1.0-py3-none-any.whl (3.6 kB) Copy SHA256 hash SHA256 Wheel py3
enveloop-0.1.0.tar.gz (2.2 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page