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.

Source Distribution

enveloop-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

enveloop-0.1.0-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file enveloop-0.1.0.tar.gz.

File metadata

  • Download URL: enveloop-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for enveloop-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a0c29ef898cd94d70c500b16b1aa683474b4736555d44ce611be261259f9d335
MD5 ea96b75d6cad8a8a7ec5d936fa865b90
BLAKE2b-256 eb75d743e0b73d0d39100ee512f02a950488de9d5f76179063a55ab16017ae6a

See more details on using hashes here.

File details

Details for the file enveloop-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: enveloop-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1

File hashes

Hashes for enveloop-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 541baf72e70e9305ba40435c987ef1c109a401ffafe2b96885ab866f7eae2ef8
MD5 33ce301412d7cf308c6b9367299c4f17
BLAKE2b-256 343d319be8e96fdc737fb33c3cd14ba9b1f8b16b4566fe425f63a423714b93f3

See more details on using hashes here.

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