Skip to main content

Golang-esque defer functionality

Project description

Defer

pypi-version pypi-license pypi-versions travis-ci.org codecov.io codacy contributors thanks

Add a simple golang-esque deferral system for python.

Example

import defer


@defer.with_defer
def example_function():
    print("Hello")
    defer.defer(print, "!")
    print("World")

example_function()
> Hello
> World
> !

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

py-defer-1.1.1.tar.gz (10.6 kB view hashes)

Uploaded Source

Built Distribution

py_defer-1.1.1-py2.py3-none-any.whl (3.8 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