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


Download files

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

Files for enveloop, version 0.1.0
Filename, size File type Python version Upload date Hashes
Filename, size enveloop-0.1.0-py3-none-any.whl (3.6 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size enveloop-0.1.0.tar.gz (2.2 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page